String.length is not
method from String.prototype
length - property strings
See MDN docs for String.length
To answer your question, the reason "hello" instanceof String returns false in how instanceof actualy works
Object.getPrototypeOf("hello")
However, as your string literal has access to these methods / properties
"my string".constructor === String // true "my string".__proto__ === String.prototype // true
If you need an actual String instance
var str = new String("hello"); str instanceof String
source share