JavaScript name/value pair

Name value pair

A 'Name' is something which maps to a value or which refer a value. A Name could only have one value on any given context. However that value could be another Name/Value pair. Address = '100 Main st'

Object

In Javascript object is a collection of Name/Value pair. In the bellow example we could see a valid javascript object which is a collection of name value pair with the most top parent name is 'Address'. Which is collection of other name/value pair.One of them is 'place'; but it again collection of name/value pair of 'floor' and 'area'. For now just consider javascript object is a collection of name/value pair later we will see more in details. Address:{ firstline:'100 main st', place:{ floor:3, area:'2A' } }

Back Next