Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

JS if condition

const count = 20;

if (count === 0) {
  console.log('There are no students');
} else if (count === 1) {
  console.log('There is only one student');
} else {
  console.log(`There are ${count} students`);
}
Source by kitt.lewagon.com #
 
PREVIOUS NEXT
Tagged: #JS #condition
ADD COMMENT
Topic
Name
1+4 =