FreeCodeCampChina / freecodecamp.cn

FCC China open source codebase and curriculum. Learn to code and help nonprofits.
https://fcc.asia/
Other
36.73k stars 1.36k forks source link

这个是BUG吗 #654

Open ra1ph-L opened 4 years ago

ra1ph-L commented 4 years ago

// 举例 function ourFunction(ourMin, ourMax) {

return Math.floor(Math.random() * (ourMax - ourMin + 1)) + ourMin; }

ourFunction(1, 9);

// 请把你的代码写在这条注释以下

function randomRange(myMin, myMax) {

return Math.floor(Math.random() * (myMax - myMin + 1)) + myMin; // 请修改这一行

}

// 你可以修改这一行来测试你的代码 var myRandom = randomRange(5, 5.5);

ra1ph-L commented 4 years ago

这样写也能通过