Skip to content

Instantly share code, notes, and snippets.

@juliomatcom
Created July 9, 2017 08:57
Show Gist options
  • Save juliomatcom/62aaefb29df5cca6f628cd99aa664996 to your computer and use it in GitHub Desktop.
Save juliomatcom/62aaefb29df5cca6f628cd99aa664996 to your computer and use it in GitHub Desktop.
Using Boolean, Number and String with new operator
var b = new Boolean(false); // { [[PrimitiveValue]]: false }
var n = new Number(10); // { [[PrimitiveValue]]: 10 }
var s = new String('foo'); // { 0: "f", 1: "o", 2: "o", length: 3, [[PrimitiveValue]]: "foo" }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment