You are viewing a single comment's thread. Return to all comments →
function getLetter(s) { switch(true) { case 'aeiou'.includes(s[0]): return 'A'; case 'bcdfg'.includes(s[0]): return 'B'; case 'hjklm'.includes(s[0]): return 'C'; default: return 'D' } }
Seems like cookies are disabled on this browser, please enable them to open this website
Day 2: Conditional Statements: Switch
You are viewing a single comment's thread. Return to all comments →