This question has come out of another, which concerns the behaviour of console.dir with string literals. In particular, see the comments on my answer.
console.dir
A
That's exactly what it's doing.
Javascript boxes primitive types as needed.
boxes
Here's some more information:
http://princepthomas.blogspot.com/2011/07/auto-boxing-javascript-primitive-types.html