fix: declares index variable in Set challenges
parent
3d86eaecbc
commit
a79d5fec19
|
@ -372,7 +372,7 @@
|
|||
" // this method will remove an element from a set",
|
||||
" this.remove = function(element) {",
|
||||
" if(this.has(element)){",
|
||||
" index = collection.indexOf(element);",
|
||||
" var index = collection.indexOf(element);",
|
||||
" collection.splice(index,1);",
|
||||
" return true;",
|
||||
" }",
|
||||
|
@ -424,7 +424,7 @@
|
|||
" // this method will remove an element from a set",
|
||||
" this.remove = function(element) {",
|
||||
" if(this.has(element)){",
|
||||
" index = collection.indexOf(element);",
|
||||
" var index = collection.indexOf(element);",
|
||||
" collection.splice(index,1);",
|
||||
" return true;",
|
||||
" }",
|
||||
|
@ -481,7 +481,7 @@
|
|||
" // this method will remove an element from a set",
|
||||
" this.remove = function(element) {",
|
||||
" if(this.has(element)){",
|
||||
" index = collection.indexOf(element);",
|
||||
" var index = collection.indexOf(element);",
|
||||
" collection.splice(index,1);",
|
||||
" return true;",
|
||||
" }",
|
||||
|
@ -550,7 +550,7 @@
|
|||
" // this method will remove an element from a set",
|
||||
" this.remove = function(element) {",
|
||||
" if(this.has(element)){",
|
||||
" index = collection.indexOf(element);",
|
||||
" var index = collection.indexOf(element);",
|
||||
" collection.splice(index,1);",
|
||||
" return true;",
|
||||
" }",
|
||||
|
@ -630,7 +630,7 @@
|
|||
" // this method will remove an element from a set",
|
||||
" this.remove = function(element) {",
|
||||
" if(this.has(element)){",
|
||||
" index = collection.indexOf(element);",
|
||||
" var index = collection.indexOf(element);",
|
||||
" collection.splice(index,1);",
|
||||
" return true;",
|
||||
" }",
|
||||
|
|
Loading…
Reference in New Issue