Conditional Statements
Use if, else if and else to make decisions in your programs.
What you should understand
Read the lesson carefully, study the example, then use the editor below to experiment with the code yourself.
let marks = 75;
if (marks >= 70) {
console.log('Excellent');
} else if (marks >= 50) {
console.log('Good');
} else {
console.log('Keep learning');
}
Output
See what your code produces.
Test your understanding
Choose the best answer.
Which structure is used to store multiple values?