Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (8)

Sign In or Sign Up now to post a comment!
  • You forgot the litteral way, the JSON way of writing objects, which the lightest way

  • While many people refer to classes in JavaScript, the fact is that JavaScript is not class based and does not have classes. It is a Prototypical language, where all objects inherit from a prototype object (not class).

    Additionally, your examples are commented to say that properties/menthods would go into the object constructors, but only your fist example does that. The second two show declaring methods outside of the constructor.

  • nice

  • prototype is not a function/method of javascript. it's an object.

  • @kelvin0yt ya, your probably right, I'm not 100% good with all the terms and stuff, I"m writing these tutorials while I'm learning myself.

  • nice

  • Is JavaScript actually a Object oriented programming language?

  • @breakingthebeat yes, (almost) everything is a object

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more