我不断收到此错误:-看起来您的函数没有返回“唉,您没有资格获得信用卡。资本主义就是那样残酷。当收入参数为 75 时。
有人可以告诉我我做错了什么吗?干杯:)
var creditCheck = function(income)
if(income >= 100)
{
return "You earn a lot of money! You qualify for a credit card.";
}
else
{
return "Alas you do not qualify for a credit card. Capitalism is cruel like that.";
}
creditCheck(75);
creditCheck(125);
creditCheck(100);