My blogs

Why nullish coalescing operator?

Have you encountered a scenario during comparison where if first operand is null or undefined, and you want to use the right operand which has defined value? Many Javascript developers faced this scenario often 🙃. Hence, ES11 introduced a logical operator called nullish coalescing operator (??) which assigns right operand to result of expression if left operand is null or undefined.

Javascript variables

Javascript variables Hey folks. We shall go through one of the basic units of storage - variables.

  • Variables are containers that store values.
  • Javascript is dynamically typed language - run time data types i.e, a variable can be used to store any type of data - be it strings, integers, floating numbers etc.
  • Javascript functions

    A function is simply a set of statements that performs a task. It can be just displaying some data or processing a data input etc. Ok, let me simplify it.

    slice, splice Javascript methods. Are they different?

    Javascript built-in methods help a lot in saving time and reducing the number of lines for the logic if we were to implement it from the scratch. There are two array methods - slice, splice which appear to do the same functionality but they are completely different. So, let's dive in and clear out all the confusion around these methods