Course Review

Final Practice Exercise Review

You can have it on one condition..!

Human beings (and other animals) make decisions all the time that affect their lives, from small ("should I eat one cookie or two?") to large ("should I stay in my home country and work on my father's farm, or should I move to America and study astrophysics?")

Conditional statements allow us to represent such decision making in JavaScript, from the choice that must be made (for example, "one cookie or two"), to the resulting outcome of those choices (perhaps the outcome of "ate one cookie" might be "still felt hungry", and the outcome of "ate two cookies" might be "felt full, but mom scolded me for eating all the cookies".)

on one condition


Source: Mozilla, https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Building_blocks/conditionals
Creative Commons License This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.