- Help Center
- Coding Resources
- Javascript Resources
Challenge Hints: Removing from Arrays
A list of hints for the challenges in the Removing from Arrays lesson..
Last updated - July 23, 2024
Checkpoint |
Did you use a variable name and brackets [] with a semicolon at the end? Did you call ".pop" on your array variable? Did you call alert() with myArray.pop() inside? |
Multiplication Fun |
Did you declare the array from the instructions? Did you store all of the element of the array together? Did you multiply all of the elements of the array together? alert( ) |
Take Out the Trash |
Did you declare an array trashbin with at least 10 elements? Did you declare an empty array recycle? (?s)trashbin\.pop\s*\(\s*\).*?prompt\s*\(.*?\) Did you check if each item can be recycled? Did you do nothing otherwise? |
Go Fish |
Did you declare an array with at least 15 elements? Did you declare an array with 5 elements? Did you prompt the user if there is a match in their pile? Did you do nothing if there was a match in the pile? Otherwise, did you alert the user to go fish, pop the element off the draw deck and push it to the users deck? Was this prompt and check process repeated at least 5 times? |
For more help with JavaScript, check out our JavaScript Reference Guide!