Skip to content

Instantly share code, notes, and snippets.

@isaacs
Forked from Marak/gist:405836
Created May 19, 2010 01:37
Show Gist options
  • Save isaacs/405840 to your computer and use it in GitHub Desktop.
Save isaacs/405840 to your computer and use it in GitHub Desktop.
var n = 45
, sys = require("sys")
sys.puts(typeof n); // number
sys.puts(n instanceof Number); // false
var m = Number(45);
sys.puts(typeof m); // number
sys.puts(m instanceof Number); // false
var o = new Number(45);
sys.puts(typeof o); // object
sys.puts(o instanceof Number); // true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment