Skip to main content

In the web and apps development world, new developers some time feel alienated and discouraged when talking about more advanced topics. One of the reasons because it makes them feel like they’re reading a foreign novel. The alphabets might look familiar, but none of it makes any sense.

And it’s hard to make sense of everything, especially if you have to keep stopping every second word to figure out what the sentence is trying to tell you.

For this article, our Melbourne web developers decided to list down the top 4 concepts that they often explain to interns or new developers.

  1. declarative

In JavaScript programming, a declarative pattern is when the final outcome did not depend on the order of functions. You can code them in any order and still get the same result. The sequence doesn’t matter.

We will use this mathematical equation as an example,

(3 x 2) + 8 – 3 = 11

So if you move the order around, you’re still going to get the same result.

– 3 + (3 x 2) + 8 = 11

8 – 3 + (3 x 2) = 11

 

  1. immutability, mutation, mutable

Strong immutability can be understood when nothing about the object changes. While weak immutability is when the shape of your data doesn’t change.

You know that an object has strong immutability when it goes into a function and out of it in the exact same form. As for weak immutability objects, the names, number of keys and order do not change but the data attached to it might.

 

  1. recursion

Recursion is a condition when a function continues to call itself until a particular condition is fulfilled. It might sound like a loop, but it’s not. They have some similarities, but the main difference is loop is a JavaScript conditional method while a recursion is an entire function that keeps calling itself.

Recursion consists of two parts, he call based on a particular condition, and the exit clause. Your exit clause is basically what happens at the end of your recursion.

 

  1. async

Imagine driving to a department store. Your goal is to move from home to the department store. But along the way, your gas is running out and you have to make a stop at the gas station. By stopping, you paused your travel to department store for a while. JavaScript works in similar mechanism. Your JavaScript code executes from one end to the other. But sometimes, you need it to pause, just for a moment while you run off to an external source to grab something. The moment of pausing is called the async part of JavaScript.

The keyword async also returns an implicit promise. It means it returns a promise by default.

Promise is the thing that orders your code to stop and wait because there’s going to be a delay in getting something done. For example, you’re waiting for an external API to respond with the correct data.