Loading... <pre><code>function sjh() { let x = Math.random(); x = Math.ceil(x * 100);//定义x为一个随机数 //console.log(x) while (true) {//创建一个循环 let num = prompt('请输入一个20以内的数字'); if (num > x) { alert("大了"); } else if (num < x) { alert("小了"); } else if (num = x) { alert("恭喜你猜对了") let a = confirm("还要在玩一次吗") if (a == true) { sjh() } else { break; } } } } sjh()</code></pre> 猜你想看 每日一学:PHP 中的array_pad函数详解 JS作用域闭包 每日一学:PHP 中的array_unique函数详解 每日一学:PHP 中的array_change_key_case函数详解 求助帖!关于axios跨域的问题 - 已解决 每日一学:PHP 中的array_product函数详解 每日一学:PHP 中的array_intersect_assoc函数详解 vscode配置备份 cdn.xxhzm.cn免费的静态文件加速服务 tcping不是windows默认命令, tcping怎么安装? 最后修改:2022 年 06 月 05 日 © 允许规范转载 赞 0 如果觉得我的文章对你有用,请随意赞赏
2 条评论
这个好有意思 真是个小聪明蛋
阿巴阿巴