Merge pull request #16232 from cassidypignatello/fix/size-of-set-challenge
Fixes undeclared index variable in Set challenges
This commit is contained in:
@ -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;",
|
||||
" }",
|
||||
|
Reference in New Issue
Block a user