I believe the JavaScript parsers simply don't allow you to call methods directly on the literals.
However you can do this...
var n = (15).toString();
console.log(n);
... and it will work.
EDIT
Thanks @apsillers, for the explanation. I didn't know that. The first dot on numbers is treated as part of the number, hence the problem. 1.1.toString()
works. Interesting.