In the last tutorial, you learnt about writing to HTML document and taking input using the prompt function.
In this tutorial, you'll learn about if-statements, using which you can do certain things only if certain conditions are met. In plain English, if-else-statements correspond to “If this is true, do this; else, do that.” or “If this condition is true, perform this action; otherwise, do that action.”
A good way to visualize if-statements is flow charts. If-statements represent the yes / no questions in the flowchart below.