Created
July 9, 2017 07:05
-
-
Save anonymous/25a3829ee41a93b983aa6c23b42c2b78 to your computer and use it in GitHub Desktop.
Sample JS Code for bigNums Exercise
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
7. Iterate over the "bigNums" array. | |
If any number is less than 10, replace it with "x". | |
Return "bigNums" | |
HINT: You will need to "loop" over the array and check "if" the numbers are "less than" 10 | |
Answer: This function should return ["x", 12, "x", 56, 19, "x", "x", "x", 14, 10, "x"] | |
*/ | |
let bigNums = [ 3, 12, 7, 56, 19, 9, 1, 5, 14, 10, 2 ]; | |
for(let i=0; i < bigNums.length; i++) { | |
if bigNums [ i ] > 10 (and I am STUCK!!!!!!!) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment