Basic JavaScript data types and structure you must know.


Boolean is a logical data type. It has two values like true or false. In javascript boolean is used as a conditional for a section of code execute like if or loop-like for.


When there is no object value, then it is null. It is javascript’s primitive value and is used as a falsy value in boolean operation.

Number type

The updated version of javascript ES6 has two number types. Number types have a range of between -(253 − 1) and 253 − 1.

BigInt type

Big int is for storing only integer numbers with arbitrary precision. It is able to operate on large integer numbers more than the limit of number types.

String types

The sting is used for representing or manipulation a sequence of characters. It has various methods to perform an operation for a string. Like the length, index of, substring.


It is an object prototype has methods to perform traversal and mutation operation. It has tons of methods like split, slice, push, pop, etc for manipulation of the array.

Pop, Push

The pop method removes an item from the end of an array. The push method remove the item from the end of an array


The map is one of the most useful methods of the array. It performs a fast loop operation from start to end of an array and gives one item at each iteraiton.

shift, unShift

The Shift method can remove an item and the unshift method can add an item at the beginning of the array.


Finding an item position in javascript is easy. Just call the indexOf method to find the position of an item.