nachoplatter
Re:For modern development, Javascript is just something you need to learn
on Tuesday October 29, 2013 @10:37AM (#6634409)
"The built-in option to check an object’s ‘type’ is instanceof, which looks at the function an object was created with."
Nitpick, because I happen to be teaching myself the Javascript class system right now: instanceof examines an object's prototype inheritance, not its constructor. x instanceof Y if x inherits from Y.prototype, so it's possible to "sever" an object from its constructor by replacing the constructor's prototype property. Coming from a strongly typed language, this takes some getting used to!