Answers for "typeof object in javascript"

12

check data type in js

typeof("string"); //string
typeof(123); //number
Posted by: Guest on July-25-2020
10

how to use typeof in javascript

console.log(typeof 93);
// Output = "number"

console.log(typeof 'Maximum');
// Output = 'string'

console.log(typeof false);
// Output = "boolean"

console.log(typeof anUndeclaredVariable);
// Output = "undefined"
Posted by: Guest on April-22-2020
0

typeof in js

console.log(typeof 93);
// Output = "number"

console.log(typeof 'Maximum');
// Output = 'string'

console.log(typeof false);
// Output = "boolean"

console.log(typeof anUndeclaredVariable);
// Output = "undefined"
Posted by: Guest on January-01-1970

Code answers related to "Javascript"

Browse Popular Code Answers by Language