protocol://subdomain.domain.com:port/resource
var obj = {};
or var obj = new Object();
myObject.hasOwnProperty("nameOfProperty");
// best practice
var james = {
name: "James",
age: 31,
saySomething: function() {
console.log("yolo is a no go");
},
isCool: false,
friends: ["Tom", "Marion", "Angie", "all y'al"],
goOutside: function() {
console.log("/me goes outside!!!!!");
}
};
// old school
var james = new Object();
james.name = "James";
james.saySomething = function() {
console.log("yolo is a no go");
};
james.isCool = false;
// array vs object
var arr = [];
var obj = {};