In Java script almost everything can be considered under objects. Even booleans can be considered as object we add new keyword to it. Only primitives of Java script are not considered as objects. Primitive data types are the data types which do not have any value. The primitive data types are hard coded and they cannot be changed. Lets take an example of primitive data type.
For example Var x = 6.38
In the above example we can change the value of X but we cannot change the value of 6.38 so here 6.38 is considered as primitive data type and it is not an object.
Objects are also variable in some cases. Lets look onto an example in such case.
var kiran = “Sai”;
Here kiran is a variable, at the same time he can also be an object. In this case when Kiran is a variable, he can contain certain value but when he is an object then he can contant a lot of values. This is he difference between objects and variables.