|
|
|
|
|
|
|
|
|
|
|
|
|
|
JAVA SCRIPT
Branching that involves "if-then" allows your program to behave very differently depending on what a user inputs. For example, you could write a script that would act one way toward you and a different way toward everyone else. Here's the basic form of an if-then statement:
The important parts of this structure are:
Remember, spacing is only there to make the script more legible. You can put the entire if-then statement on one line if you want, but that would be hard to read.
|
|
|||||
|
|
|||||||
|
|
|||||||
|
|
|
|