AI-powered
podcast player
Listen to all your favourite podcasts with AI-powered features
How JavaScript Runs Functions
JavaScript runs functions synchronously, which means one line after the other. If you if you run a function, then it'll run the entire function including all the lines within that function. You can make your if statements more complex by adding an else's in there. And what does that mean? Well, sometimes you want to catch all where none of the ifs are met and put them elsewhere.