This is not a real life scenario. I am trying to learn more about strings in js, and came across the following:
var name = new String('sann');
console.log('type of name=' ,typeof name);
// returns object in nodejs but string in browser
console.log('name instanceof String' ,name instanceof String)
// returns true in nodejs but false in browser
NodeJS output was in line with my expectation, I am puzzled by the browser output.
What is the reason for this difference in behaviour ?