Max 需要做個歷史記錄:
是 27 / May / 2013 在
Q&A Forum 發問,
02:00 a.m. 28 / May/2013 就有不認識的 Guru :: mkaze { 這位 mkaze 在 codecademy 已演練到 1,615 points 的高手. 幫忙指正
http://www.codecademy.com/forum_questions/51a307c0b480e164df00225a#response-51a39c763617ae46de004912
Max 將 Max的Q
和 mkaze 的 A :: 貼在底下:
這樣的對答, 新入門者 很有幫助.
PLease Any GURU may help me: re: 04/05:Functions & if / else
[I]: here my working ::
// Write your function below.
// Don't forget to call your function!
var creditCheck = function ( income)
{ if (income >= 100)
{ return "You earn a lot of money ! You qualified for a credit card.";
}
else
{ return "Alas you do not qualify for a credit card. Capitalism is cruel like that.";
}
};
console.log(creditCheck(75));
console.log(creditCheck(125));
console.log(creditCheck(100));
. * * * * * I submit it, and screen reply :::: --->>
II:
Alas you do not qualify for a credit card. Capitalism is cruel like that.
You earn a lot of money ! You qualified for a credit card.
You earn a lot of money ! You qualified for a credit card.
.****** ****
while there is an ERROR message:
Oops, try again! It looks like your function doesn't return 'You earn a lot of money! You qualify for a credit card.' when the income argument is 125.
. ***** ***** ******
My question :
[1]: once screen show 3 asnswer re: 75, 125 and 100 respectively ;
it must means my practise be CORRECT.
[2]: WHY there still with one OOPs....
. **** ****** ******
Is there anyone may help me. THANKS.
Best regards,
Max
// Write your function below.
// Don't forget to call your function!
var creditCheck = function ( income)
{ if (income >= 100)
{ return "You earn a lot of money ! You qualified for a credit card.";
}
else
{ return "Alas you do not qualify for a credit card. Capitalism is cruel like that.";
}
};
console.log(creditCheck(75));
console.log(creditCheck(125));
console.log(creditCheck(100));
. * * * * * I submit it, and screen reply :::: --->>
II:
Alas you do not qualify for a credit card. Capitalism is cruel like that.
You earn a lot of money ! You qualified for a credit card.
You earn a lot of money ! You qualified for a credit card.
.****** ****
while there is an ERROR message:
Oops, try again! It looks like your function doesn't return 'You earn a lot of money! You qualify for a credit card.' when the income argument is 125.
. ***** ***** ******
My question :
[1]: once screen show 3 asnswer re: 75, 125 and 100 respectively ;
it must means my practise be CORRECT.
[2]: WHY there still with one OOPs....
. **** ****** ******
Is there anyone may help me. THANKS.
Best regards,
Max
- 1615 pts1votes
No comments:
Post a Comment