0
What is the difference between objects and variable in javascript?
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.
+ 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
0
thanx Sushmita