how to check the type in js code example Example: check data type in javascript typeof("string"); //string typeof(123); //number