What makes the availability of both primitive and object-wrapped values in JavaScript useful?
- by Delan Azabani
I wrote a blog post a while ago detailing how the availability of both primitive and object-wrapped value types in JavaScript (for things such as Number, String and Boolean) causes trouble, including but not limited to type-casting to a boolean (e.g. object-wrapped NaN, "" and false actually type-cast to true).
My question is, with all this confusion and problems, is there any benefit to JavaScript having both types of values for the built-in classes?