javascript get type empty code example
Example 1: check data type in javascript
typeof("string"); //string
typeof(123); //number
Example 2: empty string in javascript
var s; // undefined
var s = ""; // ""
s.length // 0
typeof("string"); //string
typeof(123); //number
var s; // undefined
var s = ""; // ""
s.length // 0