Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

JavaScript if, else, and else if

if (hour < 18) {
  greeting = "Good day";
} else {
  greeting = "Good evening";
}
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #JavaScript
ADD COMMENT
Topic
Name
3+7 =