fix: declares index variable in Set challenges

This commit is contained in:
Cassidy Pignatello
2017-12-20 14:00:39 -05:00
parent 30866d5afe
commit 3737ed3eab

View File

@ -372,7 +372,7 @@
" // this method will remove an element from a set", " // this method will remove an element from a set",
" this.remove = function(element) {", " this.remove = function(element) {",
" if(this.has(element)){", " if(this.has(element)){",
" index = collection.indexOf(element);", " var index = collection.indexOf(element);",
" collection.splice(index,1);", " collection.splice(index,1);",
" return true;", " return true;",
" }", " }",
@ -424,7 +424,7 @@
" // this method will remove an element from a set", " // this method will remove an element from a set",
" this.remove = function(element) {", " this.remove = function(element) {",
" if(this.has(element)){", " if(this.has(element)){",
" index = collection.indexOf(element);", " var index = collection.indexOf(element);",
" collection.splice(index,1);", " collection.splice(index,1);",
" return true;", " return true;",
" }", " }",
@ -481,7 +481,7 @@
" // this method will remove an element from a set", " // this method will remove an element from a set",
" this.remove = function(element) {", " this.remove = function(element) {",
" if(this.has(element)){", " if(this.has(element)){",
" index = collection.indexOf(element);", " var index = collection.indexOf(element);",
" collection.splice(index,1);", " collection.splice(index,1);",
" return true;", " return true;",
" }", " }",
@ -550,7 +550,7 @@
" // this method will remove an element from a set", " // this method will remove an element from a set",
" this.remove = function(element) {", " this.remove = function(element) {",
" if(this.has(element)){", " if(this.has(element)){",
" index = collection.indexOf(element);", " var index = collection.indexOf(element);",
" collection.splice(index,1);", " collection.splice(index,1);",
" return true;", " return true;",
" }", " }",
@ -630,7 +630,7 @@
" // this method will remove an element from a set", " // this method will remove an element from a set",
" this.remove = function(element) {", " this.remove = function(element) {",
" if(this.has(element)){", " if(this.has(element)){",
" index = collection.indexOf(element);", " var index = collection.indexOf(element);",
" collection.splice(index,1);", " collection.splice(index,1);",
" return true;", " return true;",
" }", " }",