Monday, May 27, 2013

Q&A Forum in CodeCademy.com = 一點一滴有網路朋友幫忙指點迷津, 帶你學習HTML / JavaScript

Max 需要做個歷史記錄:


是   27 / May / 2013 在
Q&A Forum 發問,

02:00 a.m. 28 / May/2013 就有不認識的 Guru :: mkaze  { 這位 mkaze 在 codecademy 已演練到  1,615 points 的高手.  幫忙指正


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
  • 1615 pts
    9 hours ago
    1votes
    Sorry i'm not good in English:
    Your answer should exactly be same as instruction. You typed : You earn a lot of money ! You qualified for a credit card. but in instruction it is :You earn a lot of money! You qualify for a credit card. (in your answer there is an extra space after "money" and "qualify" was change to "qualified".)
    In exercises like this exercise it is better to copy/paste the answer from instruction to ypur code than type them by yourself :)
    Hope it helps :)
    And also when you want post codes to forum, use "Code Sample {}" (Ctrl + k) at the top of editor :)

No comments:

Post a Comment