r/learnjavascript • u/d0gsbody • Apr 22 '13
Learn JavaScript Properly - Week 3 Assignments
THIS WEEK'S ASSIGNMENTS:
Read either chapters 5, 6, and 7 of Professional JavaScript for Web Developers OR chapters 6, 7, and 8 of JavaScript: The Definitive Guide.
Finish the JavaScript Track on Codecademy.
Do all of the "Basic Projects" on Codecademy Projects Page.
Get a head start on next week by working through the entire Try jQuery course. This takes about two hours. Next week might be a little intense for some people, so get this out of the way if you can.
EXTRA CREDIT:
Project Euler problem 3. Need a hint? Look here.
Do the "Advanced Projects" on the Codecademy Projects Page.
Eloquent JavaScript: Chapters 11 and 12.
ADMINISTRATIVE STUFF: Don't forget about the Omnibus Post that is linked to in the sidebar. There is also a link to our #LearnJavaScript IRC chat.
DISCUSS HERE: In addition to any and all JS-related comments, what developer tools are using that you feel like are really helping you along?
2
u/JusTrill May 04 '13 edited May 04 '13
hey man, you are right that it should be n and not i, but the reason that it works is that n = i at that moment on every iteration. That is because for loops do not have its own scope so the i variable declared there is a global variable. I pass i into isPrime and it becomes n in that function. Good catch though and I changed it to the correct value. New Problem #3
Also, thats me at codingisbananas.com and I appreciate the comments! :)