Change the code so that the result of printing will be Anna is going to study at University.
Conditional Operators
Code correcting
Report a typo
Write a program in JavaScript
let age = 6;
if (age < 6) {
console.log("Anna is a little child");
} else if (age >= 6 && age < 18) {
console.log("Anna goes to school");
} else if (age === 18) {
console.log("Anna is going to study at University");
} else if (age > 18 && age < 22) {
console.log("Anna studies at University");
} else {
console.log("Anna works");
}
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.