Thursday, February 8th, 2007
Delving into JavaScript’s prototype member
Raphael Bauduin has been playing with the Javascript prototype member in order to get an Understanding of Javascript’s prototype member.
After he saw Doug Crockfords Advanced JavaScript presentation he cracked open Rhino and started playing.
Take a peak at the ride:
-
-
second_hoozit.toString //sun.org.mozilla.javascript.internal.InterpretedFunction@1bd4722
-
second_hoozit.__proto__.toString //sun.org.mozilla.javascript.internal.InterpretedFunction@a3bcc1
-
Hoozit.prototype.toString //sun.org.mozilla.javascript.internal.InterpretedFunction@a3bcc1
-
my_hoozit.__proto__.toString //sun.org.mozilla.javascript.internal.InterpretedFunction@c51355
-












FYI. The __proto__ property is for Mozilla only.
Douglas Crockford doesn’t actually know that much about what he’s talking about I’d like to point out…
Not only that but what the hell is with ‘hoozit’… never seen a worse convention in my life…
‘gizmo’, ‘hoozit’… i’m a little suprised i didnt see you caching scope in a variable called ‘that’ because that is the only thing worse than that convention….hmmn…i think i just made my point.
Douglas Crockford’s not quite the expert he thinks he is.
Come on guys, never heard of “Whoozits and Whatzits”? Using it as a naming convention makes no less sense than using Foo and Bar.