0

What is the difference between objects and variable in javascript?

16th Dec 2016, 10:27 AM
TechBeat
TechBeat - avatar
3 Answers
+ 3
An object is an entity in Java Heap Memory. More precisely it is an instantiation of a class. For example an analogy of an object is you as a person. A variable in Java is a reference to either a container for a primitive (int, float etc) or a reference to an object.
16th Dec 2016, 11:25 AM
Susmita Singh
Susmita Singh - avatar
+ 1
In JavaScript every single entity is an object. Like function is an object, array is an object, integers are objects. Variable are names to refer to objects... The theory of JavaScript is somewhat different from Java. For one, there is no class in JavaScript
16th Dec 2016, 1:05 PM
Rishi Anand
Rishi Anand - avatar
0
thanx Sushmita
16th Dec 2016, 12:50 PM
TechBeat
TechBeat - avatar