type variable in javascript code example
Example 1: check data type in javascript
typeof("string"); //string
typeof(123); //number
Example 2: data types in javascript
1, 1.0 // Number
'String', "String"
true, false // Boolean
{id: 1;} // Object
[1, 2, 3] // Array