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 trial

JavaScript JavaScript Basics (Retired) Working With Numbers The Random Challenge Solution

Keiran Kainth
Keiran Kainth
21,105 Points

feedback: this is far too complex for beginners in my opinion

feedback: this is far too complex for beginners in my opinion

Sam Baines
Sam Baines
4,315 Points

Hi Keiran - I believe quite the opposite, I have recently completed Javascript Basics course and found it fairly easy to complete this challenge and I am an absolute beginner having never done javascript before. It uses all the components taught to you in the basics course so far and Dave offers a lot of hints as to what you need to use for this challenge. I found it made my understanding of javascript better for all these challenges.

10 Answers

Luke Gibson
Luke Gibson
4,822 Points

Hi Keiran I agree but disagree with you, I found this really difficult at first and couldn't make a lot of sense out of most of the stages of JavaScript beginners, I completed all of the course getting as much as I could understand from it as possible, I have given it a couple of days and am now going through it again and it is now making perfect sense and I am completing all the challenges without even looking at the questions. I think you just have to be persistent.

I think some people get it straight away and others don't, I know someone that really struggles with remembering how CSS works which I find easy. Don't feel you need to give up just keep going and it will come 100%! GOOD LUCK!

Keiran, speaking as a beginner, I totally agree. I was going along fine, and then I got to the Variable Challenge and it was like someone blindfolded me and dropped me off in the woods without a compass. I was a very abrupt shift, and I ended up stopping here and going off to Codecademy to learn about it there. Once I'm done with that, I'll come back here and see if it makes more sense,

Hi,

I'm also a beginner in programming and I can totally agree. It was very difficult to understand such challenge and programming the result.

Ryan B.
Ryan B.
3,236 Points

Yes, I would have to agree. I was rocking and rolling during the first half of this challenge. The second half of the challenge I thought was an abrupt and advanced transition. I don't want to take anything away from Dave because so far this course has been very straight forward with a short learning curve.

I actually found Dave's teaching to very lucid and the challenges to be quite straightforward. However, I do recognise that every one learns differently and that we are all coming from varying backgrounds. My hunch though is that it can be easy to conflate the difficulty level of the programming in this course with the math required in a particular instance. I suspect that it may be the latter in more cases than not. I don't think that a high knowledge of mathematics is required to become a good programmer, but it certainly helps. I do think that it might be important to recognise and identify that there may be a slight distinction in what's confusing some folks. If I may offer a suggestion, it would be to work the solutions on paper or in pseudocode, then write it up in JavaScript syntax afterwards. Decomposing the solution in such a manner would enable a beginner to separate the new unfamiliar syntax from the actual calculation rather than doing both simultaneously, which may in fact compound the difficulty for us novices.

Ryan B.
Ryan B.
3,236 Points

Hi Seab,

Thanks for the input and suggestions. It's always interesting to see how other overcome these obstacles.

Keiran Kainth
Keiran Kainth
21,105 Points

Thanks, I guess some people understand things easier then others. In my personal view, the BEST way I learn is by having things literally 'spoonfed', i.e. the way you'd discuss to a 5 year old (without the patronizing tone). i.e. using lots of analogies, similes, metaphors etc. These JavaScript videos do offer some comparisons with some metaphors, although not enough in my opinion. Although the challenges were explained well, I didn't have a clue how to apply the coding in terms of 'logically' applying it to get a result. Perhaps its the syntax I'm getting confused with hmm.

Without simple analogies / similes, I usually learn by CONSTANT repetition and viewing again after again (I don't enjoy this as it takes so much time). Whereas with 'spoonfeeding' I get the 'aha!' moment in one viewing then apply it instantly. Suppose not everyone would enjoy this style of teaching though.

HTML and CSS were understood quite well, but I guess its just the logic behind JavaScript I'm not quite grasping yet.

Michael Oliver
Michael Oliver
7,855 Points

No doubt it is a challenging challenge. The idea that you're keeping in your mind that you need to "parseInt" to make it a value, then round it down by flouring it, then add 1 because you need it 1 higher.... Oh yeah and don't forget the second part.... Mind blown!! You all aren't alone, this was very back and forth for me as well.
Repetition and taking breaks, it'll come to you, at least thats what I keep telling myself!

I agree the math section made this a lot harder for me. It's becoming more difficult to keep up.

Jesse Hall
Jesse Hall
4,275 Points

I was fine until I had to stop and be like, who'd think to subtract the top number by the bottom, remembering 1 is added to it, then go ahead and tack back on the ending number to get it to work. Definitely got to be able to throw around numbers in your head

I agree, it all went well until I got to this maths challenge. It's not a programming challenge, more understanding how to do math - which isn't my strong point.

Michael Oliver
Michael Oliver
7,855 Points

Keep in mind, this is JavaScript! Very important to learn and not everyone you see everyday can do this, so that alone makes it worth doing. Also, these are "formulas" don't need to be a mathematician, just reference it.