Task 1: Using the logical && operator
- satyanarayan behera
- Aug 25, 2022
- 1 min read
You are coding an RPG game, where each character has certain skill levels based on the value saved in their score.
Create a variable named score and set it to 8
Use console.log() that includes the string "Mid-level skills:" and compares the score variable to above 0 and below 10 using the && operator
The expected output in the console should be: "Mid-level skills: true".
var score =8;
console.log("Mid-level skills: ",score>0 && score<10);
Comments