1. null vs undefined?

What is null?

null is supposed to be something that does not exist.

How can we get a null value?

For getting the null value we need to explicitly declare it.


const name = null;
console.log(name); // null

What is undefined?

undefined means a variable that has been declared but not defined.

How can we get an undefined value?

If we declared a variable but don’t set any value, then we will get undefined. Don’t understand? See the example below-

const name;
console.log(name); // undefined

Suppose, we declared a function but we don’t return anything from…

  1. What is React?

React is a Javascript library for building UI(user interfaces). It is the world’s most popular Javascript library. It’s not exactly a ‘framework” because it is not a complete solution. Sometimes, we need to use other libraries to work with react.

In framework, many decisions are already made for us. Frameworks are not flexible. Since web browsers understood Javascript, we can use React in browsers.

2. Components:

React is all about components. These components are reusable, composable, and stateful.

We can think of components as simple functions. In functions, we can call functions with some input and they…

  1. Hoisting: Hoisting is a Javascript by default behavior. It moves all the declaration at the top of the current scope (top of the function or script). This is called hoisting. Don’t understand? See the code below-
function getStudentName(info) {    if(info) {
var name = 'Rakib';
return name;
} else {
return null;

If you are new to javascript, you would think that the var name will be created if the condition is true. But it’s not true.

Behind the scenes, the Javascript engine changes the function like this-

function getStudentName(info) {
var name;
if(info) {…

As a web developer, every day we need to work with Javascript. Today in this article I am going to write about 10 Javascript built-in function which will make our life easier as a developer. And every developer should know these 10 built-in functions.

Some Build in Array Method:

  1. Array.map(): The map method allows you to loop through all the elements and allows you to execute the function to all the elements of the calling array and it returns a new array.

parameters: It takes two parameters as an argument. The first one a callback function and the second one…

Md Rakib

Web Developer (MERN Stack)

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