gpt4 book ai didi

javascript - 意外 token ,如果

转载 作者:行者123 更新时间:2023-11-28 12:22:42 27 4
gpt4 key购买 nike

我是 JS Codecademy 类(class)的初学者。我知道 super 基础。它不断告诉我意外的标记,如果我已经尝试调试这个问题几个小时了。请帮助?提前致谢!

var sleepCheck = function(numHours)
if (numHours >= 8) {
return "You're getting plenty of sleep! Maybe even too much!";
}
else {
return "Get some more shut eye!";
}

最佳答案

var sleepCheck = function(numHours){
if (numHours >= 8) {
return "You're getting plenty of sleep! Maybe even too much!";
}
else {
return "Get some more shut eye!";
}
}

您缺少 {}

关于javascript - 意外 token ,如果,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34536943/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com