QUESTION IMAGE
Question
jump to level 1
if usernumber and comparenumber are not equal in value, display variables are not equal in value. if usernumber and comparenumber are not identical (strictly equal), display variables are not identical.
1 let comparenumber = 3; // code will be tested with: 3, 8, 42
2 let usernumber = \3\; // code will be tested with: \3\, 8, \hi\
3
4 / your solution goes here /
5
Step1: Check for non - equal value
Use the != operator to check if userNumber and compareNumber are not equal in value.
if (userNumber != compareNumber) {
console.log("Variables are not equal in value");
}
Step2: Check for non - identical
Use the !== operator to check if userNumber and compareNumber are not identical.
if (userNumber!== compareNumber) {
console.log("Variables are not identical");
}Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
let compareNumber = 3;
let userNumber = "3";
if (userNumber != compareNumber) {
console.log("Variables are not equal in value");
}
if (userNumber!== compareNumber) {
console.log("Variables are not identical");
}