+ 2

Differences between objects and variables in JavaScript

Can someone tell me the similarities between objects and variables and the differences between them and their respective uses in JavaScript.

6th Jan 2018, 12:58 PM
Nytro007
Nytro007 - avatar
2 odpowiedzi
+ 14
In java-script , every variable , every class you define when instantiated is an instance of the class Object itself. When you definevariable , a reference is created and as you assign it a value ,it is stored in that memory address . ... E.g an object may be student having name, ID , address as variables.
6th Jan 2018, 1:50 PM
Abhivarshini Maddala
Abhivarshini Maddala - avatar
+ 8
I copy this from JS course Objects can contain many values.
6th Jan 2018, 1:24 PM
Muhd Khairul Amirin
Muhd Khairul Amirin - avatar