javascript instanceof vs typeof code example
Example: instanceof javascript
var color = "red";
var color2 = {};
color instanceof String // will return true
color2 instanceof Object // will return true
var color = "red";
var color2 = {};
color instanceof String // will return true
color2 instanceof Object // will return true