Skip to content

Instantly share code, notes, and snippets.

@miller3818
Created July 11, 2014 19:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miller3818/36c54da2d4ff584d3572 to your computer and use it in GitHub Desktop.
Save miller3818/36c54da2d4ff584d3572 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
</body>
</html>
/*
* The Principles of Object-Oriented JavaScript
* Objects!!!
*
*/
// Object 1 and 2 reference the same object
var object1 = new Object();
var object2 = object1;
object1.myCustomProperty = "Awesome!";
console.log(object2.myCustomProperty);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment