Will anyone please explain the difference between object and object literals in JavaScript?
So far I learned by searching google is given bellow:
1) Object is a collection of name-value pairs like: address:"my address".
2) Object Literals are a sequence of name-value pairs separated by commas and surrounded by curly braces. For example: {address: "my address", roll: 0001}
But its still not making sense to me. I can't find out the basic differences between these two. Actually, I'm confused with the 'collection of name-value pair' and 'sequence of name-value pairs'.