From 0580df0ea88c9d7cc9ed02353a22315589e40cdb Mon Sep 17 00:00:00 2001 From: Elisabeth Robson Date: Tue, 28 Feb 2017 15:52:22 -0800 Subject: [PATCH 1/3] updated palindrome to be slightly more efficient --- chapter13/palindrome.html | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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; }; From 09e494c95ce348a33a57ce9530d44ec83bdae055 Mon Sep 17 00:00:00 2001 From: Elisabeth Robson Date: Tue, 28 Feb 2017 16:26:35 -0800 Subject: [PATCH 2/3] fixed duplicate tags --- chapter12/carAndDog.html | 7 ------- 1 file changed, 7 deletions(-) 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 @@ - - - - - - - From c9d4aa785b5aac4b339bbb75bb93042ce6d8d655 Mon Sep 17 00:00:00 2001 From: Elisabeth Robson Date: Wed, 3 Jan 2018 20:54:29 -0800 Subject: [PATCH 3/3] Update howdy.html --- chapter1/howdy.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 - - +