Espruino/tests/test_typeof.js
Rick Waldron 1079bf5aae Fixes gh-171. typeof null should be "object", not "null"
This also revealed the bug reported at https://github.com/espruino/Espruino/issues/172

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2014-01-13 17:25:32 -05:00

11 lines
310 B
JavaScript

console.log( typeof undefined === "undefined" );
console.log( typeof null === "object" );
console.log( typeof true === "boolean" );
console.log( typeof false === "boolean" );
console.log( typeof "foo" === "string" );
console.log( typeof 1 === "number" );
console.log( typeof function() {} === "function" );