Skip to content

Challenge Using Typeof

Quincy Larson edited this page Aug 20, 2016 · 1 revision

Challenge using typeof

You can use typeof to check the data structure, or type, of a variable.

Note that in JavaScript, arrays are technically a type of object.

console.log(typeof(""));

console.log(typeof(0));

console.log(typeof([]));

console.log(typeof({}));
Clone this wiki locally