Objects are variables that are storing more values, (properties). Objects are a part of the world of Object Oriented Programming, a way of programming that is highly recommended to learn more about it.
In our example for objects we used the following code:
var person = {
name: "Bucky",
age: 87
};
That is the typical syntax of javascripts object as well:
var objectname = {
property1: "property1valueinstringformat",
property2: property2valueinarithmeticformat
};
We achieve to insert more values in one variable by turning it to an object and by use the "property" format to each of our value
{ property: valueofproperty };
Curley brackets are defining the are of the properties, and also they defining that our variable is an object, and we separate our properties with the comma symbol.
- Read more about Object Oriented Programming
- in Wikipedia Read more about Javascript Objects in W3schools
Written with StackEdit.
