Here is another quick tip on JavaScript, the default value in Javascript. If you are coming from the C# world you may have seen something along the line of

The above code shows the ?? for null coalescing operator in C#, don’t confused it by the generic default value. In JavaScript, there is the double pipe operator ||, where the object is null or undefined.

In the above code we have create a function call add and we have defined default values inside of the function. Learn it, love it, use it 🙂 It comes in handy to define default values.