You can use the JavaScript typeof operator to find the type of a JavaScript variable:
typeof "John" <=== string data type
typeof 3.14 <=== number data type
typeof false <=== boolean data type
typeof [1,2,3,4] <=== object data type
typeof {name:'John', age:34} <=== object data type