您好,我的代码遇到了一些问题,如果有人能帮助我的话,我对此很新。谢谢。
var a = 5;
var b = 6;
var c = 7;
document.write(Math.floor((Math.random() * 3) + 5));
if (5) {
alert("mission failed we will get them next time");
} else {
alert("sorry");
}
请从学习文档=> https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/if...else开始
let RandomVal = Math.floor((Math.random() * 3) + 5);
console.log(RandomVal);
if (RandomVal===5) {
console.log("mission failed we will get them next time");
} else {
console.log("sorry");
}