+ 1
If statement
Cons time = 0700; Let wakeUp; Write an “if” statement that checks if “time” is equal to “0730”, if time is equal to 0730 assign the variable “wakeUp” the value of “true”, else, assign wakeUp false.
5 ответов
+ 1
are you asking for this 👇
var wake =prompt("Enter time");
if(wake === "0730"){
alert("true")
}else{
alert("false")
}
+ 2
Yea i just figured it out too! Thanks
+ 2
Well mine looks like this:
Coms time = 0700;
let wakeUp;
If(time === 0730) {
wakeUp = true;
}
else{
wakeUp=false;}
+ 1
you have error on your code
you haven't declared time
o730 should be between " here"
and many error
0
ok @luis good night 😁