From 9ffd5278d07bb451efb1c59b79dc08b0e7871f55 Mon Sep 17 00:00:00 2001 From: Philipp Abraham Date: Sat, 12 Apr 2014 09:31:23 +0200 Subject: [PATCH 1/5] grammar fix --- objects1/README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/objects1/README.md b/objects1/README.md index 86184a8..9d09b0d 100644 --- a/objects1/README.md +++ b/objects1/README.md @@ -12,7 +12,7 @@ var key, for ( key in obj ) { if ( obj.hasOwnProperty( key ) ) { - console.log( key + ' exist in obj' ); + console.log( key + ' exists in obj' ); console.log( key + ': ' + obj[key] ); continue; } @@ -22,9 +22,9 @@ for ( key in obj ) { ... and the result of executing it is... ``` -name exist in obj +name exists in obj name: john -surname exist in obj +surname exists in obj surname: doe ``` @@ -32,7 +32,7 @@ surname: doe ``` name doesn't exist in obj -surname exist in obj +surname exists in obj surname: doe ``` @@ -50,7 +50,7 @@ var key, for ( key in obj ) { if ( obj.hasOwnProperty( key ) ) { - console.log( key + ' exist in obj' ); + console.log( key + ' exists in obj' ); console.log( key + ': ' + obj[key] ); continue; } @@ -73,7 +73,7 @@ Object.prototype.hasOwnProperty = function (key) { for ( key in obj ) { if ( obj.hasOwnProperty( key ) ) { - console.log( key + ' exist in obj' ); + console.log( key + ' exists in obj' ); console.log( key + ': ' + obj[key] ); continue; } @@ -81,7 +81,7 @@ for ( key in obj ) { } ``` ```js -assert(items.length == 3 && items[0] == 'name doesn\'t exist in obj' && items[1] == 'surname exist in obj' && items[2] == 'surname: doe'); +assert(items.length == 3 && items[0] == 'name doesn\'t exist in obj' && items[1] == 'surname exists in obj' && items[2] == 'surname: doe'); ``` ```js var items = []; @@ -98,4 +98,4 @@ var console = { } }; ``` ---- \ No newline at end of file +--- From 90ded28b1eef44cce9dc3a8c902bfb731e852a59 Mon Sep 17 00:00:00 2001 From: Philipp Abraham Date: Sat, 12 Apr 2014 09:32:55 +0200 Subject: [PATCH 2/5] fixed typo --- hoisting1/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hoisting1/README.md b/hoisting1/README.md index 5f40ad2..108daff 100644 --- a/hoisting1/README.md +++ b/hoisting1/README.md @@ -1,6 +1,6 @@ # Hoisting and Conditionals Statements -I'm Ernie and my friend is Bert and we wrote this code to tell other people which typeo of birds we like. +I'm Ernie and my friend is Bert and we wrote this code to tell other people which type of birds we like. ``` var bird = 'Pidgeons'; @@ -66,4 +66,4 @@ var bird = 'Pidgeons'; assert(true); ``` ---- \ No newline at end of file +--- From 17c8a117a6926dbe28d5e7af45745ce3c4540774 Mon Sep 17 00:00:00 2001 From: Philipp Abraham Date: Sat, 12 Apr 2014 09:34:39 +0200 Subject: [PATCH 3/5] added whitespace for consistency --- objects2/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/objects2/README.md b/objects2/README.md index efac37d..a30c7a4 100644 --- a/objects2/README.md +++ b/objects2/README.md @@ -8,7 +8,7 @@ As you know Javascript has two different ways to treat the data it receives as a See the following code: ``` -var oPerson = { name: 'john'}; +var oPerson = { name: 'john' }; (function(oTeacher) { window.getTeacher= function() { @@ -119,4 +119,4 @@ var console = { } }; ``` ---- \ No newline at end of file +--- From 075d1dd7000e8c00b29a9fb0c1572949daa238ad Mon Sep 17 00:00:00 2001 From: Philipp Abraham Date: Sat, 12 Apr 2014 09:36:57 +0200 Subject: [PATCH 4/5] why instead of what --- objects2/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/objects2/README.md b/objects2/README.md index a30c7a4..df69739 100644 --- a/objects2/README.md +++ b/objects2/README.md @@ -42,7 +42,7 @@ Object { name: "john", surname: "doe" } --- -Explain what this is happening: +Explain why this is happening: ```js From e1d3e35d2ee4003f12038120be8a5002f586d99c Mon Sep 17 00:00:00 2001 From: Philipp Abraham Date: Sat, 12 Apr 2014 09:41:55 +0200 Subject: [PATCH 5/5] be more specific about what to fix --- objects2/README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/objects2/README.md b/objects2/README.md index df69739..ab9e836 100644 --- a/objects2/README.md +++ b/objects2/README.md @@ -60,7 +60,10 @@ assert(true); --- -Fix the code to : +Fix the code to make the third execution return +``` +Object { name: "mary", surname: "sullivan" } +``` ```js var oPerson = { name: 'john'};