Suggest simple libraries to read source code for learning JS

7Responses

Write your response…

This answer has received 1 appreciation.

Underscore.js / Lodash is probably the closest to what you are looking for. Here's why:

  • small library - check!
  • well commented/ documented - check! (I find lodash to have better comments, but underscore is pretty well commented as well)
  • covers general JavaScript concepts - check!
  • "passing functions around as arguments" - hell yeah!
  • both libraries have awesome documentation

Lodash is a fork of Underscore, but on steroids. Both are great libraries! Learning them and digging deeper in their source code can greatly improve your Javascript knowledge.

Wanna take it one step further? No, problem - pick a random function from the library and rewrite it using your knowledge. After that compare your function with the original one - find the differences and similarities of both, try to understand why their approach is different than yours (if different) and refactor/optimize your function. You can even find a bug or piece of code, which can be further optimized - pull request that son of a btch. If accepted - congratulations, you just contributed to one of the coolest JavaScript libraries!

Write a reply...

Things that you can get started with. (PS: May not be straight forward, but I hope this list helps you out!)

  • JS Best Practices
  • Read Eloquent JavaScript, for starters.
  • Look into this
  • An excellent video, on how to learn things, not just for JavaScript.
  • I don't wanna sound like an AngularJS fanboy, but yeah, give it a go. Just try to understand what it does, it will help you with how to write organized code.
  • If you really liked AngularJS, and want to know more, this will help. (Yeah, I guess I'm an AngularJS fanboy.)
  • Also, get to know the "What the fuck?" side of JavaScript
  • And finally, go crazy, build anything off your own from what you learn daily, break things, make things, write bad code, learn from them.

Good luck & Happy Scripting!

Write a reply...

I learned JS by building GWT and Dart applications, then telling the compiler not to minify the JS, then reading through the JS to see if I understand what's going on. That's probably a lot harder than it needs to be.

Tony Alicea has some excellent JS tutorials, try this YouTube video, if you like it, get the full 12 hour course which will teach you how to write your own JS Libraries: youtube.com/watch?v=Bv_5Zv5c-Ts

In the full course, you will enhance your abilities as a Javascript developer by delving into first class functions, callbacks, closures, IIFEs, prototypal inheritance, diving into the source code of jQuery, and building your own small framework/library.

Thanks! The course looks very promising. will definitely check it out.

Write a reply...

Nicolas Bevacqua is an Argentinian developer, he writes a blog and is the author of some pretty popular open source javascript libraries (Horsey, Dragula, Rome, Insignia). You should read his Javascript quality guide and then read the source code of his different libraries. This article: Designing front end components is also of interest.

Write a reply...

Hi Sai. You can also try codeschool if you want to learn by doing. As an Angular dev, i must warn you that if you're not really at ease in JS dev, you better follow some tutorials rather than diving alone into Angular core since it's quite complex. Good luck though ;).

The same goes for almost any course, even those as well-rounded and hands-on as codeschool. Codeschool has "soup-to-bits' videos that shows you how to apply it in a project. Also, you need to get yourself a pet project or a real (paid) one to practice what you've learnt.

Write a reply...

codewars.com its a great site that uses the classic coding kata approach to learning J.S it gives you the opportunity to think for yourself and problem solve, then when your finished you can compare you code with other users on the site.

dailyjs.com/framework-index this tutorial series teaches the fundamentals of how to build a js library/framework.

Finally I would look on github, npm and bower and look for small packages that you can digest quickly and move up from there, this guy has a ton of smaller J.S repos github.com/bendrucker?tab=repositories

Write a reply...

Not a library, but very useful learning javascript: codewars.com/?language=javascript (make sure to sign up as you get something completely different and more useful. Especially different ways in which the same thing can be accomplished can be 'useful' to learn more.

Write a reply...

Join a friendly and inclusive Q&A network for coders

  • 🖥Pick the technologies you like & read great content through your feed.
  • 💬Ask a question when you want to learn more about anything.
  • 🚀Share what you know & build your portfolio.
Sign up nowLearn more

loading ...