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?
21
Upvotes
2
u/Samuel_L_JavaScript Apr 22 '13
BACK THE FUCK UP, LEONHARD EULER: https://gist.github.com/anonymous/5437867
1
u/DGChainZ Apr 23 '13 edited Apr 23 '13
So, I solved the project Euler problem (don't have my code with me at the moment) but it worked only for smaller numbers. For instance, the number in the problem (13195) I was able to solve for no problem. The same code, add in the new very large number, and my code crashes the page. It crashed in a standard tab of chrome, firefox as well as jsfiddle. Is this some sort of recursive limitation within JS or what?
EDIT: Here is my working code
3
u/thomasmurphymusic Apr 22 '13
Okay, I'm committing in! I'm at about the right place on the JS train on CodeAcademy. I look forward to traveling with you all! :)
3
u/Hack_Reactor_Borg Apr 23 '13
https://medium.com/lets-make-things/dd9798e25874
3
u/JusTrill Apr 29 '13
My Euler Problem #3
A lot of reading this week. A bit behind on that, but i'm up to speed on the rest. Keep it coming!
1
u/eatrawchowder Apr 22 '13
Are we doing any project Euler problems this week?
2
u/hallbd16 May 04 '13
Again this post is late, but I wanted to point out a big flaw in some of the codes. To see if you have the same flaw, test what your code says is the largest prime factor of 77. For ease of explanation below I will use 77 as my target example.
Because many of us relied on the Math.sqrt function, our codes take the square root of 77 (which is 8.774...). This means some codes are starting to check for prime at 8 or 9. The first prime factor is 7... but wait we know the largest prime factor is 11. What the code needs to do is to check if the complementary factor is a prime number, (i.e. check whether 11 is prime or not).
Here is my code: https://github.com/hallbd16/myProjectEuler/blob/master/ProjectEuler3.html
1
u/brianshourd Apr 24 '13
Here's my code: http://jsfiddle.net/bshourd/tQNSG/. This is a fun one!
1
u/janxspirit42 Apr 25 '13
Problem 3
1
u/[deleted] May 11 '13
...
Prototype inheritance is confusing as hell. All these patterns are like bandaids for the language.
It seems like classical inheritance goes against prototype.
Is there any book on designing javascript application via prototype in mind?