News for hackers. Stuff that matters.
Re:Introduction to Object-Oriented JavaScript - MDC Docs by voidr on Wednesday May 04, 2011 @07:48AM (#2513517)
> Inheritance A Class can inherit characteristics from another Class.

Somebody should tell Mozilla, that there are no classes in JavaScript....

Re:Introduction to Object-Oriented JavaScript - MDC Docs by johncoltrane on Wednesday May 04, 2011 @08:08AM (#2513547)
The document is probably targeted at newcomers from other languages. But still…
Re:Introduction to Object-Oriented JavaScript - MDC Docs by erez on Wednesday May 04, 2011 @07:56AM (#2513526)
The guide says that immediately after the terminology paragraph
Re:Introduction to Object-Oriented JavaScript - MDC Docs by johncoltrane on Wednesday May 04, 2011 @08:15AM (#2513556)
But comes back to it at the Custom Objects part(1). And everywhere. They don't use "class" as a keyword, though, but more in a CS way which can be problematic because other keywords like "prototype", "array" or "object" mean pretty much the same thing in both contexts.

An interesting ressource, anyway.

(1) https://developer.mozilla.org/en/Introduction_to_Object-Orie...

Re:Introduction to Object-Oriented JavaScript - MDC Docs by sjs on Wednesday May 04, 2011 @01:02PM (#2514443)
Please don't make us start saying "object used as a class".
Re:Introduction to Object-Oriented JavaScript - MDC Docs by voidr on Thursday May 05, 2011 @02:37AM (#2516420)
The first step to learning JavaScript is to forget about class-ical OOP, you can't write good code if you start forcing class-ical concepts on JavaScript, it's a prototypical language encouraging people to treat it as something else is wrong.
Re:Introduction to Object-Oriented JavaScript - MDC Docs by sjs on Friday May 06, 2011 @10:07PM (#2523059)
When a language has a deficiency people make up for it with libraries. If you don't acknowledge the "class pattern" for object inheritance then you are dismissing an incredibly popular use of OO.

Whether or not code reuse via OO is a good thing or not is a whole other debate though. I don't try to warp every problem into a class hierarchy, but sometimes it's a useful conceptual tool.