Sign up
Sign in
We can use nested ternary operators to transform an if...else or switch statement into a one-liner. Consider a function that returns th…
if...else
switch
Tari Ibaba
Милан Тодоров
Follow
--
Share
Why not a dictionary and then return dictionary[number]?
Object orienter
Help
Status
About
Careers
Press
Blog
Privacy
Terms
Text to speech
Teams