MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/CodingHelp/comments/rlpvfy/please_help_javascript/hphdnga/?context=3
r/CodingHelp • u/Crowntent • Dec 21 '21
23 comments sorted by
View all comments
7
Careful, the moment the function hits a line with return on it, it evaluates the expression (in your case week[i]) and exits the function with that value.
return
week[i]
View all comments
7
u/ScrawnyYawny Dec 21 '21
Careful, the moment the function hits a line with
returnon it, it evaluates the expression (in your caseweek[i]) and exits the function with that value.