typeof operator can be used to get the data type of any variable.
function in return as the data type.
Primitive data types are
On the other side the Object data type includes
array and any instance created using new keyword like
new WeakSet(), and
Below are examples of how to check different data types
A BigInt is created by appending
n to the end of an integer literal. BigInts, can operate with numbers beyond the
Symbol were introduced in ES6 i.e. ECMAScript 2015. A Symbol value represents a unique identifier.
You would be surprised to know that
null is also having data type of