Created
July 20, 2017 08:30
-
-
Save alordiel/c4245cd05bdd07676670ebd575a1f515 to your computer and use it in GitHub Desktop.
JS varaible types and definitions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var a; | |
var b = ""; | |
var c = 0; | |
var d = null; | |
var e = []; | |
var f = {}; | |
var g = false; | |
console.log("a: " + typeof a); // "undefined" | |
console.log("b: " + typeof b); // "string" | |
console.log("c: " + typeof c); // "number" | |
console.log("d: " + typeof d); // "object" | |
console.log("e: " + typeof e); // "object" | |
console.log("f: " + typeof f); // "object" | |
console.log("g: " + typeof g); // "boolean" | |
console.log("h: " + typeof h); // "undefined" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment