10 Javascript Tricky Concepts

Javascript Most Tricky Parts

Closures In Javascript

Closures are the combination of a function that is bundled together with the references of its surrounding states. Closures give us access to an outer functions scope from an inner function. In javascript every time we create a function, we create closures.


var add = (function () {
var counter = 0;
return function () {counter += 1; return counter}

add(); // The counter is 3.

Truthy Value VS Falsy Value

Truthy value means which is true. There are some values that are defined as true by JavaScript itself. Examples…

10 Most Demanding ReactJS Facts

Javascript Library ReactJS

What is React??? Library or Framework???

React is a Javascript Library. It is not a framework. It is used in building user interfaces for different web applications. It is not a complete solution. Rather it is adaptive with the other libraries. Here I would like to mention the Unix philosophy:

Write programs that do one thing and do it well. Write programs to work together.

— Doug McIlroy

React follows this Unix philosophy. It is a small library. It is focused on just one thing and does that thing in the best way.

Virtual Dom…

Concepts To Become A Better Programmer

Primitive Data Type vs Non-primitive Data Type

Primitive Data Type:

Primitive data are single values. They have no additional properties and methods. Boolean, byte, short, int, long, float, double, char are called primitive data types.


console.log(2); // 2
console.log("hello"); // hello
console.log(undefined); // undefined

Concepts of Javascript
Concepts of Javascript
Lets Learn Some Core Concepts of Javascript

Numbers in Javascript

1. Number.isNaN():

In Javascript, the Number is NaN() is a method that determines that the passed value is NaN or not. The syntax is Number is NaN(value). It means the value should be in number form but it is not a number. That means NaN.


  • In Number isNaN() method, there is no problem of forcefully converting the parameter to a number.
  • This is the safest method to pass values that normally converted to NaN.
  • Only number type values that are also NaN, those values return true.
Number.isNaN(123) //false Number.isNaN('123') //false Number.isNaN('Hello') //false Number.isNaN('') //false Number.isNaN(true) //false Number.isNaN('NaN') //false Number.isNaN(NaN) //true Number.isNaN(0…

Md. Faizur Rahman Khan

MERN Stack Web Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store