Welcome to the quiz! Try to answer those questions, which cover the topics of this module.
- write the code needed to call the
bark()function if the
dogIsHungryvariable is true, and the
sleep()function if it’s false
- in a switch statement, why do we need to add a break or a return at the end of each switch case?
- what are the ways we can break out of a
- explain in your own words how can “immediately invoked function expressions” help when it comes to using the loop index inside a function, inside the loop. Why do we have to wrap them in an additional function?