diff --git a/chapter1/howdy.html b/chapter1/howdy.html index 4f96db2..9e8cfea 100644 --- a/chapter1/howdy.html +++ b/chapter1/howdy.html @@ -5,10 +5,9 @@ Howdy - - + diff --git a/chapter12/carAndDog.html b/chapter12/carAndDog.html index 5c95f62..9ca6740 100644 --- a/chapter12/carAndDog.html +++ b/chapter12/carAndDog.html @@ -123,10 +123,3 @@ - - - - - - - diff --git a/chapter13/palindrome.html b/chapter13/palindrome.html index 84fa7c6..5124e22 100644 --- a/chapter13/palindrome.html +++ b/chapter13/palindrome.html @@ -7,13 +7,10 @@ String.prototype.palindrome = function() { var len = this.length-1; - for (var i = 0; i <= len; i++) { + for (var i = 0; i <= len/2; i++) { if (this.charAt(i) !== this.charAt(len-i)) { return false; } - if (i === (len-i)) { - return true; - } } return true; };