javascript define object structure code example
Example 1: javascript object
var person = {
first_name : "Marty",
last_name : "Mcfly",
born : 1968,
died : 1933,
lovers: ["Jennifer Parker","Baines McFly"]
};
Example 2: define function in javascript
/* Declare function */
function myFunc(param) {
// Statements
}
Example 3: create a json object in javascript
var employee = {
"firstName": firstName,
"lastName": lastName
}