I am always, confused and unsure, and all over the place when it comes to typeof and instance of etc… It has done my head for too long, so I took sometime to try to straighten it all out. I provided a small github project (which you can help improve) https://github.com/valtido/better-typeOf
var value = "test me"
type(myValue); //output: "object String"
//in coffee script
value = "test me"
type myValue; #output "object String"
If you LIKE it, you SHARE it 😉