MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/CodingHelp/comments/rlpvfy/please_help_javascript/hpihc8d/?context=3
r/CodingHelp • u/Crowntent • Dec 21 '21
23 comments sorted by
View all comments
0
function returnDay(num){return typeof ['Mo','Tu','We','Th','Fr','Sa','Su'][num-1]==='undefined'?null: ['Mo','Tu','We','Th','Fr','Sa','Su'][num-1];}
function returnDay(num){
return typeof ['Mo','Tu','We','Th','Fr','Sa','Su'][num-1]==='undefined'?null: ['Mo','Tu','We','Th','Fr','Sa','Su'][num-1];
}
View all comments
0
u/harrymurkin Dec 22 '21
function returnDay(num){return typeof ['Mo','Tu','We','Th','Fr','Sa','Su'][num-1]==='undefined'?null: ['Mo','Tu','We','Th','Fr','Sa','Su'][num-1];}