Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix a git snafu.

  • Loading branch information...
commit db01b5271d47d5ff0da9600eb0321984787e163b 1 parent 6f32301
@creationix authored
Showing with 7 additions and 14 deletions.
  1. +7 −14 articles/object-graphs/variables.js
View
21 articles/object-graphs/variables.js
@@ -1,14 +1,7 @@
-// Create a parent object
-var tim = {
- name: "Tim Caswell",
- age: 28,
- isProgrammer: true,
- likesJavaScript: true
-}
-// Create a child object
-var jack = Object.create(tim);
-// Override some properties locally
-jack.name = "Jack Caswell";
-jack.age = 4;
-// Look up stuff through the prototype chain
-jack.likesJavaScript;
+// Let's create some local variables in the top scope
+var name = "Tim Caswell";
+var age = 28;
+var isProgrammer = true;
+var likesJavaScript = true;
+// Test to see if the two variables reference the same value
+isProgrammer === likesJavaScript;
Please sign in to comment.
Something went wrong with that request. Please try again.