Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialshadryck
12,151 PointsCan someone tell me what I'm doing wrong? ~Javascript basics quiz.
1 Answer
Sam Baines
4,315 PointsHi - the first screenshot shows you failing because you do not need to add the (;) semi-colon after the function name 'Warning' as this is already in place in the code. And the second screenshot, the answer is 'arguments' - as in you can pass the function one or more arguments, like in following:
randomNumber(upper, lower);
For the third and fourth screenshots - you need to 'return' the variable message i.e. in the space you need to put the return statement followed by the message variable.
shadryck
12,151 Pointsshadryck
12,151 PointsAh yes, that makes perfectly sense, I missed it. Anyhow this doesn't work for greeting() nor greeting('name'). Any ideas?
EDIT - So tired I even totally missed your last sentence "For the third and fourth screenshots - you need to 'return' the variable message i.e. in the space you need to put the return statement followed by the message variable." Thats why I asked about the greeting()
Been coding for the whole day non-stop now.. Time to take a long break.
shadryck
12,151 Pointsshadryck
12,151 PointsYour reply got deleted Marcus Parsons, anyway thank you both for your time to point out the errors.
Marcus Parsons
15,719 PointsMarcus Parsons
15,719 PointsI deleted it. I believe Sam already had the correct answer, but that's no problem. I'll let him have the glory this time haha :P You're welcome, Vincent.
Sam Baines
4,315 PointsSam Baines
4,315 PointsVincent that is because it is not asking you to call the greeting function (as technically your are already inside the function itself) the challenge is asking you to return the message variable like this:
I hadn't explained it well but thanks Marcus.
shadryck
12,151 Pointsshadryck
12,151 PointsSee my first reply ~EDIT Thanks for trying to explain though.