Object Initialization part 1

Object Initialization



Use the object literal or initializer syntax to create single objects.var John = {name: "John", age: 25};
var James = {name: "James", age: 21};

Objects consist of properties, which are used to describe an object. Values of object properties can either contain primitive data types or other objects.

Comments

Popular posts from this blog

String Operators

Introducing object part 3

The math object part 2