I finished the conditional exercises and I wanted to practice a bit by changing an if else block into a switch.
The if else works but I don’t see how to turn it with switch, does anyone have an idea?
thanks.
let applePrice = 1.49;
let orangePrice = 2.23;
let kiwiPrice = 1.29;
I would agree with @janbazant1107978602 and say it’s a matter of convention and readability. Just like the use of a fat arrow function vs function declarations. Because of a discussion with an experienced developer I read somewhere on this forum, I switched from using arrow function for very complex functions to function declarations