How to Make Learning JavaScript Easier

How to Make Learning JavaScript Easier

Jump to:

If you're brand new to programming, everything can seem strange and scary. There are dozens of alien concepts that are discussed casually by the experts but which make no sense to beginners.

For example, a 'variable'. Is it a thing? What sort of a thing? Any sort of thing? Ridiculous!

However, programming is one of the most valuable skills that you can acquire today—and it can also be fun and rewarding. More and more people are trying to learn a programming language in order to open up new careers or entrepreneurial opportunities. And JavaScript is a very common entry-point, since it is used on almost all websites and fits so well with HTML & CSS.

JavaScript is not the only programming language that is useful for the web, but it's one of the quickest and easiest to get started with. It is sometimes seen as a less 'serious' language, because of it's origins as a simple scripting language. But you can achieve a lot with modern JavaScript.

People often dismiss JavaScript as a tool for simple jobs like image galleries and modal dialogues. However, it has powerful features and can be used to build a full web application. It can even be used as a server-side language now, with Node.js.

However, beginners shouldn't worry about advanced features until they're ready. It's important to take learning a programming language step by step. Many beginners worry that programming is extremely difficult—but it needn't be, as long as you have a good learning plan.

In the early stages, it's simply a case of getting used to a few new concepts. They aren't too complicated, but anything new takes some time to get used to. It's vital that you allow for this and have patience with yourself.

Knowing where to begin can often be the most difficult part of being a beginner. That's why I've put together the following tips (presented in video & written format) to help you make the strongest possible start at learning JavaScript.

Tip #1: Make sure you're comfortable with HTML and CSS

If you're going to work with JavaScript, you'll almost certainly be working with HTML and CSS at the same time. So resist the tempation to rush ahead and start learning JavaScript before you're comfortable with these two other fundamental languages of the web.

JavaScript's most common use is for allowing elements to respond to user interaction. If a user clicks a button to submit a form, or to open up a modal diaglogue containing a login form, or to view the next image in a gallery—that's all handled by JavaScript, but the buttons, forms and images are created within HTML.

If you're not sure what an <img> element is, or how (or why) you'd add a 'class' attribute to it, then you need to study HTML a little longer before rushing into JavaScript.

Currently, the best way to animate elements on a website is to use JavaScript to trigger CSS animations. These are handled best by the browser and will produce the smoothest effects on mobile devices.

To do this, you'd write CSS that handles the animation and assign it to a class (or pseudo class). You'd then use JavaScript to add or remove that class from the element in question when it's interacted with.

If none of that makes any sense, then definitely spend a little longer learning HTML and CSS. Don't worry—it won't take too long! And in the next tip, we'll cover the best resources for practicing these languages.

Tip #2: Make use of the best online resources

The best online resources for learning to code are interactive, with bitesize sections that you can tackle in short bursts.

Nowadays, there are top-quality online learning environments that are completely free to use. Make sure you visit CodeCademy, FreeCodeCamp and Khan Academy and complete all the relevant lessons on each one.

CodeCademy and FreeCodeCamp offer lots of community features, while Khan Academy offers some more general and advanced-level programming lessons. So be sure to tackle just one site at a time but do make your way through all of the lessons.

If you can spend 30-60 minutes per day (or at least 3-4 days per week) practicing online, you'll make steady progress at learning JavaScript.

You can also subscribe to various blogs, podcasts and magazines to get even more information about JavaScript delivered in chunks that you can work through in an hour or less.

This kind of information is either free or low cost. It may not be perfectly curated to suit your stage and style of learning, but it still plays an important role.

Good JavaScript-covering blogs, podcasts and magazines to subscribe to include:

  • Smashing Magazine - This site is a huge free resource for web developers of all skill levels, covering a vast array of topics from JavaScript to user experience design
  • Net Magazine - This magazine comes in printed or phone/tablet app versions, and does require a subscription fee but for those who like to read well-curated printed material it could be a good option
  • David Walsh - This blog is written by one of Mozilla's Senior Web Developers, and it contains all kinds of tips and short tutorials on modern web development practices
  • Codrops - This site publishes detailed tutorials using the latest HTML5, CSS3 and JavaScript techniques for creating beautiful websites; it's a little on the intermediate-advanced side but very inspiring
  • The Treehouse Show - Treehouse are a company that offer paid video tutorials for learning to code, but their podcast is completely free and is very accessible to beginners (and so is their blog)
  • JavaScript Jabber - This is a more advanced-level podcast, so bookmark it and write a reminder to yourself to check it out once you're past the JavaScript beginner stages

Tip #3: Start a project

Once you've finished the interactive tutorials on the sites mentioned in Tip #2 above, you're ready to start a project of your own.

Choose something that interests you, but keep it very simple to start with. Consider basing it on a well-written tutorial from one of the websites or magazines listed above, if possible.

HTML, CSS and JavaScript can be used for such a wide range of things that you should be able to find a project that suits you well. For example, if you're into illustration and animation, you could begin with the SnapSVG.js intro tutorial and then think about what you could build from there.

If you're more interested in building sleek user interfaces, you could start with the jQuery UI introduction tutorials. Or, if you're keen to work on interactive web apps, perhaps look at Firebase's getting started tutorial.

Beginning a project of your own will open up a whole new world of learning opportunities. It may feel a bit intimidating, so make sure to really break your project down into small, achievable steps. That way, you can avoid feeling overwhelmed.

And if you end up in such a coding pickle that you have no idea what to try next? The following two tips will help.

Tip #4: Find a teacher

Once you've spent a few weeks practicing at home, you'll probably have a LOT of questions. Especially if you've been working on your own projects. Online tutorials, blogs and even forums can only help you so much.

You can speed up your learning significantly by finding a teacher to answer your specific questions, and to give guidance on reaching your specific goals.

Whether you sign up for a group class or locate a nearby tutor for 1-2-1 teaching, make sure you have written down your main questions ahead of time. This way, you can be sure to get them answered. If you attend a class or workshop, try to find one without too large a group of students. Otherwise, the teacher might not be able to answer everyone's questions.

If you're currently employed in a full-time role, it's possible that the company may have a budget for increasing employee skills. Make sure to inquire about this so that you don't miss out on a possible funding source.

Tip #5: Connect with other newbies

Learning is a journey, with some easy downhill slopes but also many difficult uphill climbs. And during those difficult bits, the most useful resource you can have is a community of people to turn to for help.

JavaScript newbies can provide all sorts of support, advice and assistance to each other. They can even form pairs and groups to work on projects together—often a far more rewarding experience than spending hours plugging away at a project alone.

Plus, the more people you're in touch with the more likely you'll come across additional opportunities. Someone's giving away a ticket to a web developer conference that they can't make it to anymore? Someone heard about a really interesting internship or entry-level job that's not being advertised yet? You won't know if you're not part of the community.

Online communities aren't all wonderful, so you'll need to hunt around a little to find the best place. This list should help you get started:

  • The FreeCodeCamp website has a chat channel for all coding newbies to ask questions, which get answered in a very timely manner
  • There are social media groups, like this JavaScript community on Google+
  • StackOverflow is a Q&A site with a JavaScript category, where all kinds of questions and answers can be discussed
  • Find meetup groups on by searching for 'JavaScript', 'learn to code' and similar categories—female learners can find groups aimed at helping women learn to code, too, such as the Ladies Who Code chapters

You can also join GitHub, which is a completely free code-sharing site (amongst other things). You can publish your own projects on there and rummage around in other peoples' code to see how it all works.

Bonus Tip: Have fun!

And don't give up. Those are really the only two ingredients for guaranteed JavaScript success. If you enjoy learning to write JavaScript and persist at it, you will inevitably progress to intermediate and then advanced levels of JS knowledge.

Try not to set unrealistic expectations for yourself, too. If you're currently working full-time in another field, then it can be difficult to find more time and energy to learn JavaScript during your evenings and weekends. Allow yourself plenty of time to rest and perhaps use some holiday time for more intensive coding practice.

A problem shared is a problem halved, too, so make sure you're taking advantage of all the opportunities that exist for learning in pairs and groups. Whether it's real-life or online classes, forums, chat channels or social networks, if you look you will find dozens or even hundreds of other JavaScript newbies.

Not only will you benefit from their support and advice, but you'll be able to help others—which is the best way to reinforce your own knowledge. Consider starting a blog of your own to record your learning practice, and create a profile on GitHub so that you can share your code and contribute to other projects.

Social, enjoyable learning is the best kind. So have fun, and keep going!