I'm playing with prototype functions and can't understand why the simple example below isn't returning the negative of a number.
Number.prototype.neg = function(x) { return -x };
var num = -1;
var num2 = 1234;
console.log(num.neg()); // returns NaN (and not 1)
console.log(num2.neg()); // returns NaN (and not -1234);
Any idea where I've made the mistake? I know that I could use property getters instead, but I'm working my way through the basics first (and hopefully learning from the mistakes).