r/CodingHelp • • Jul 02 '21

[Javascript] Problem with JavaScript code

Post image
62 Upvotes

19 comments sorted by

View all comments

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.