Skip to content

Instantly share code, notes, and snippets.

@sevperez
Created August 8, 2018 16:09
Show Gist options
  • Save sevperez/2e90bcc539e95b50e61406f38c415f52 to your computer and use it in GitHub Desktop.
Save sevperez/2e90bcc539e95b50e61406f38c415f52 to your computer and use it in GitHub Desktop.
console.log("\"string\" type:", typeof "string"); // Logs: "string" type: string
console.log("7 type:", typeof 7); // Logs: 7 type is: number
console.log("7.5 type:", typeof 7.5); // Logs: 7.5 type is: number
console.log("true type:", typeof true); // Logs: true type: boolean
console.log("undefined type:", typeof undefined); // Logs: undefined type: undefined
console.log("null type:", typeof null); // Logs: null type: object
console.log("{} type:", typeof {}); // Logs: {} type: object
console.log("[] type:", typeof []); // Logs: [] type: object
console.log("function type:", typeof function(){}); // Logs: function type: function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment