你好,我有一些问题,我的代码,我是相当新手,如果有人可以帮助我,谢谢。
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");
}
发布于 2019-02-21 09:26:37
请从学习=> 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");
}
https://stackoverflow.com/questions/54797742
复制相似问题