AI-powered
podcast player
Listen to all your favourite podcasts with AI-powered features
How to Store Multiple Values in JavaScript
I lean heavily towards if statements as well, just because I think they're more human readable. Where I see switch cases used a lot in JavaScript is if you're coming from a language that supports state machines where like based on what's happening on the screen right now,. Like in the UI, the state of your application changes. But having said that you can technically do that with an if statement as well, but it's just not used as often for a state machine. Mike wants to talk about loops and arrays. Specifically, how do you store multiple values in one place? And then once they're stored there, howDo you go through them and maybe change them more manipulate them in some