Learn JavaScript for complete beginners?
How do I learn JavaScript the correct way? I don't want to learn JQuery to start off with, I just want to learn the concepts, and then I can move onto the libraries, etc.
I've tried to read the book Eloquent javascript. However I don't find it very beginner friendly, with all the hard challenges for example...
Any suggestions on how to learn it?
18 comments
[ 3.1 ms ] story [ 57.0 ms ] threadAt the end of each short chapter, you'll work through repetitive exercises a la Zed Shaw's LPTHW.
It's a very good gentle intro to syntax and the basics of functions, variables, etc.
However, a word of warning. JS is a double edge sword as a way to learn concepts of programming. It's awesome because you can do fun stuff on a webpage fast so the positive feedback loop is rewarding. But JS also has some peculiar behavior that can be hard to grock and debug if you don't have your computer science fundamentals down or at least someone to help you over the hump when things get weird.
For a complete beginner the book is total nonsense and worse than overwhelming. The only plausible outcome is frustration and a higher likelihood the person will give up learning.
People need to please stop recommending JS The Good Parts to beginners. Please stop.
Beginners need an intro to the language and often an intro to programming concepts. What are they supposed to do with chapters on closure and currying?
When you think about recommending it again to a beginner, please stop and think about what a beginner knows, and what makes sense for them to learn as a next step.
After all, it's just s recommendation, not a command. I don't see a reason to throw a tantrum over it.
Then learn how to run a script from the browser (create a html file and inside write <script src="my_code.js"></script>, and put my_code.js in the same repertory as the html page, and finally open the it with the browser).
Then, play around, learn how javascript can interactively change a page, etc.
Try Meteor (meteor.com). That way you start from a complete development environment, and you can focus on actually using JavaScript, as well as feel good about being productive. Bring in new libraries to play with using atmospherejs.com. Try to think of a small website that you can build (a todo list, a checkbook balance sheet, a notetaking app), so that you can have real problems to wrestle with and a real goal to strive for.
Use Meetup.com or other community groups to find other people to talk with. Be honest about where you are at ("I'm a total beginner"), ask people about what they're working on, be nice and apologize for not knowing much. Be confident about your ability to learn. Talk about what you're doing. ("I'm working on a small pet project so I can learn"). Go into detail if you can.
Be patient. Be persistent. Also practical. The JavaScript world is vast, you can't know about everything. Ask yourself, do I need to know about this cool library/technology right now, or should I spend my time doing something else, like actual coding? Think about the bikeshedding problem, i.e. "shipping" (finishing your project) is better than bikeshedding (https://en.wikipedia.org/wiki/Parkinson%27s_law_of_trivialit...)
Read an authorative book on JavaScript (e.g., JavaScript: the good parts). There's no substitute. No website or blog article will get you familiar with the "deeper" concepts of the language. Don't worry if you don't remember everything, just try to understand each of the concepts and then plan on re-reading it again 6 months from now. Plan on reading more than one of these books.
Have fun!
Also I would learn HTML and CSS first (if you haven't already) then dive into javascript.