Why does instanceof return false for some literals?
Primitives are a different kind of type than objects created from within Javascript. From the Mozilla API docs: var color1 = new String(“green”); color1 instanceof String; // returns true var color2 = “coral”; color2 instanceof String; // returns false (color2 is not a String object) I can’t find any way to construct primitive types with … Read more