Objects | Sololearn: Learn to code for FREE!



What is the need of classes in JavaScript if almost everything is an object

8/4/2019 7:43:29 AM

Patrick Muoka

4 Answers

New Answer


String is a class what would you do without this data type? You would have to create your own right? That's there purpose to create data types to use in your program 😊


To define objects of your own behavior, like this : https://code.sololearn.com/WfUOxuP9iTmA/?ref=app Here is the full series : https://code.sololearn.com/WvIsS7qN8npX/?ref=app


Like Gordon said. To give new identity and behaviour which will be a model object. Just like lego you can do so many things and even create a world. Lego world 😀YAY


I am not too flashy with coding yet but from what I can understand objects just hold multiple variable, and I have not touched on core objects yet so. . .well is everything from introduction to objects all about objects?