Skip to content

Instantly share code, notes, and snippets.

@shaunwallace
Created July 21, 2017 08:36
Show Gist options
  • Save shaunwallace/1f4cae3251c196a77f78e8b32cd33792 to your computer and use it in GitHub Desktop.
Save shaunwallace/1f4cae3251c196a77f78e8b32cd33792 to your computer and use it in GitHub Desktop.
Return values when using the typeof operator
typeof 'foo'; // "string"
typeof 42; // "number
typeof {}; // "object"
typeof true; // "boolean"
typeof null; // "object"
typeof undefined; // "undefined"
typeof () => {}; // "function"
typeof []; // "object"
typeof Symbol(); // "symbol"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment