Object-Oriented JavaScript Second Edition by Unknown
Author:Unknown
Language: eng
Format: epub
Publisher: Packt Publishing
Previously, toString() only returned this.name. Now, in addition to that, there is a check to see whether this.constructor.uber exists and, if it does, call its toString() first. this.constructor is the function itself, and this.constructor.uber points to the parent's prototype. The result is that when you call toString() for a Triangle instance, all toString() methods up the prototype chain are called:
>var my = new Triangle(5, 10); >my.toString(); "Shape, 2D shape, Triangle"
The name of the property uber could've been "superclass" but this would suggest that JavaScript has classes. Ideally it could've been "super" (as in Java), but "super" is a reserved word in JavaScript. The German word "über" suggested by Douglass Crockford, means more or less the same as "super" and, you have to admit, it sounds uber-cool.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
What's Done in Darkness by Kayla Perrin(25465)
Shot Through the Heart: DI Grace Fisher 2 by Isabelle Grey(18189)
Shot Through the Heart by Mercy Celeste(18136)
The Fifty Shades Trilogy & Grey by E L James(17742)
The 3rd Cycle of the Betrayed Series Collection: Extremely Controversial Historical Thrillers (Betrayed Series Boxed set) by McCray Carolyn(13157)
The Subtle Art of Not Giving a F*ck by Mark Manson(12857)
Scorched Earth by Nick Kyme(11801)
Stepbrother Stories 2 - 21 Taboo Story Collection (Brother Sister Stepbrother Stepsister Taboo Pseudo Incest Family Virgin Creampie Pregnant Forced Pregnancy Breeding) by Roxi Harding(10923)
Drei Generationen auf dem Jakobsweg by Stein Pia(10192)
Suna by Ziefle Pia(10164)
Scythe by Neal Shusterman(9227)
International Relations from the Global South; Worlds of Difference; First Edition by Arlene B. Tickner & Karen Smith(8566)
Successful Proposal Strategies for Small Businesses: Using Knowledge Management ot Win Govenment, Private Sector, and International Contracts 3rd Edition by Robert Frey(8384)
This is Going to Hurt by Adam Kay(7631)
Dirty Filthy Fix: A Fixed Trilogy Novella by Laurelin Paige(6423)
He Loves Me...KNOT by RC Boldt(5768)
How to Make Love to a Negro Without Getting Tired by Dany LaFerrière(5334)
Interdimensional Brothel by F4U(5270)
Thankful For Her by Alexa Riley(5126)