Javascript Object Oriented Programming - different ways of creating Classes and Methods
Loading...
2,986
Loading...
Uploader Comments (FreeWebTutorialsRock)
Video Responses
This video is a response to What is JavaScript?
see all
All Comments (8)
-
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
-
@breakingthebeat yes, (almost) everything is a object
-
nice
-
Is JavaScript actually a Object oriented programming language?
Loading...
prototype is not a function/method of javascript. it's an object.
kelvin0yt 10 months ago
@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.
FreeWebTutorialsRock 10 months ago