Suggest simple libraries to read source code for learning JS


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:

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 ;).

Codeschool might be a good resource, but i have never felt i have truly understood a topic after doing a codeschool course on it. Might not be my cup of tea. True that. that is why I am only focusing on plain JS before learning any frameworks!

Write a reply...

Load more responses

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 ...