![Replace your switch statement and multiple “if and else”, using Object Literals — [en-US]. | by Tauan Tathiell | Medium Replace your switch statement and multiple “if and else”, using Object Literals — [en-US]. | by Tauan Tathiell | Medium](https://miro.medium.com/v2/resize:fit:1400/1*ybAjycqYW_HYBBXnSG5s3A.png)
Replace your switch statement and multiple “if and else”, using Object Literals — [en-US]. | by Tauan Tathiell | Medium
![Simon Høiberg on X: "JavaScript Question ❓ If statement or switch statement? Which syntax do you prefer? 🤔 https://t.co/WEnBAK3kYY" / X Simon Høiberg on X: "JavaScript Question ❓ If statement or switch statement? Which syntax do you prefer? 🤔 https://t.co/WEnBAK3kYY" / X](https://pbs.twimg.com/media/EpBs72jW8AALckf.jpg:large)
Simon Høiberg on X: "JavaScript Question ❓ If statement or switch statement? Which syntax do you prefer? 🤔 https://t.co/WEnBAK3kYY" / X
![javascript - trying to use switch with if else statement to make operations. but but syntax error appears? - Stack Overflow javascript - trying to use switch with if else statement to make operations. but but syntax error appears? - Stack Overflow](https://i.stack.imgur.com/cTfs4.jpg)