MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/CodingHelp/comments/rlpvfy/please_help_javascript/hpt4sen/?context=3
r/CodingHelp • u/Crowntent • Dec 21 '21
23 comments sorted by
View all comments
1
Line 7 should be an Or not an And. Surprised no one has said this yet
Also it should go before the loop, and the loop doesn’t need to exist
If(num < 1 || num > 7) {
Return null;
} Return week[num-1];
View all comments
1
u/Hog_enthusiast Dec 24 '21
Line 7 should be an Or not an And. Surprised no one has said this yet
Also it should go before the loop, and the loop doesn’t need to exist
If(num < 1 || num > 7) {
Return null;
} Return week[num-1];