Results 1 to 2 of 2

Thread: Inheritance in js(JavaScript) - prototype

  1. #1
    Join Date
    Jan 2012
    Posts
    74
    Thanks
    10
    Thanked 0 Times in 0 Posts

    Default Inheritance in js(JavaScript) - prototype

    A)is used for
    1) Inheritance in js(JavaScript)? Is this the ONLY way of Inheritance in js?
    derivedObj.prototype = new BaseObj();
    or
    2)adding properties/methods to an object, that added to Contractor of this obj?
    in this case old objects that already instantiated will have as null this property?

    B)prototype property used for anything else in HTML5 TECHNOLOGIES?

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    I'd suggest taking a look at Crockford's page on "Classical Inheritance in Javascript"

    http://www.crockford.com/javascript/inheritance.html

Similar Threads

  1. Replies: 1
    Last Post: 01-06-2012, 04:55 PM
  2. Replies: 0
    Last Post: 09-24-2009, 04:08 PM
  3. Inheritance Program
    By SChaput in forum Java
    Replies: 1
    Last Post: 11-18-2008, 02:13 AM
  4. Inheritance Subtleties?
    By Trinithis in forum JavaScript
    Replies: 1
    Last Post: 07-07-2007, 11:36 AM
  5. Trouble with inheritance
    By craigtb in forum Java
    Replies: 2
    Last Post: 04-06-2007, 08:32 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •