MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/CodingHelp/comments/oc1b7p/problem_with_javascript_code/h3sjisv/?context=3
r/CodingHelp • u/Cheesybread4ever • Jul 02 '21
19 comments sorted by
View all comments
3
It's not clever js, but it you want to make sure the array contains every number from 1 to 9 you can add them all together. Then return whether the sum is 45. Also make sure that the numbers aren't all 5s.
3
u/chrimack Jul 02 '21
It's not clever js, but it you want to make sure the array contains every number from 1 to 9 you can add them all together. Then return whether the sum is 45. Also make sure that the numbers aren't all 5s.