Object

Define an object

var object = {
  number: 10,
  string: "string",
  array: [1,2,3],
  object: {a: 1, b: 2}
}

Add new property to object

object.newProperty = "value";
object['key'] = 'value';

delete property

delete object.newProperty;

Window object (global object)

The Global scope is stored in an object which called window

function test(){
    var local = 10;
    console.log("local" in window);
    console.log(window.local);
}
test();
var global = 10;
console.log("global" in window);
console.log(window.global);