when I am doing the following snippet
var name = new String("NewDelhi");
var count = new Number(10);
console.log(name instanceof String); //false
console.log(count instanceof Number); //true
when I am using name as variable it showing me false while giving it some other variable it showing true
var str = new String("NewDelhi");
var count = new Number(10);
console.log(str instanceof String); //true
console.log(count instanceof Number); //true
why is this happening.