Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

5.4.2. else Clauses¶

let billHasBeenPaid = true;

if (!billHasBeenPaid) {
   console.log("Your bill is due soon!");
} else {
   console.log("Your payments are up to date.");
}

//Your payments are up to date.

///remember: ! = "not" 
Source by education.launchcode.org #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
2+1 =