You can do
"a".charAt(0);
wouldn't it be nice if you could do:
42.isMeaningOfLife();
well, or rather something more practical like
myNumber.round();
Sure the first thing that crossed my mind is that this would be a performance hog but apparently that is not how the JS compiler works. Check this MDN article on JS strings:
Note that JavaScript distinguishes between String objects and primitive string values. (The same is true of booleans and numbers.)
String literals (denoted by double or single quotes) and strings returned from String calls in a non-constructor context (i.e., without using the new keyword) are primitive strings. JavaScript automatically converts primitives to String objects, so that it's possible to use String object methods for primitive strings. In contexts where a method is to be invoked on a primitive string or a property lookup occurs, JavaScript will automatically wrap the string primitive and call the method or perform the property lookup.