× Terms of Use Privacy Policy

Take me back!! I want my CSS!! Click me to get back :)

×

READY FOR A NEW CAREER?

But not sure where to start? Find out if a tech career is right for you.

TAKE THE 3-MINUTE QUIZ

Are you making these common JavaScript beginner mistakes?

Mistake #1: Over-relying on jQuery Plugins

One of the best things about JavaScript is that it has a super low barrier to entry, particularly if you make use of the vast sea of jQuery plugins.

Want to add a fart joke to your website?

Download Fartscroll.js and add this link right before your </head> tag:

[code]
[/code]
And these three  line of code at the bottom of your HTML document:
[code]
[/code]

And voila! You are in the farts, without really understanding how JavaScript is making that fart sound happen.

Solution: Roll your own JavaScript
Yes, this will take longer, but challenge yourself to build a simple JavaScript feature (like a slideshow) from scratch. Learn how to instantiate an array and fill it with a dynamic set of HTML elements. Learn how to step through an iterator and how to build the logic of a slideshow loop.

Mistake #2: Not taking the time
to learn JavaScript fundamentals

Developer Martha Girdler says that there are a few basic mistakes that she sees beginning JavaScript programmers make over and over.

“When you are just getting started it’s hard to understand the difference between some basics of the JavaScript language. For example, the difference between writing a function and calling it:

[code]
var kitten = function() {
console.log(‘mew’);
}
[/code]

vs.

[code]
kitten();
[/code]

Or the difference between parameters and arguments:

[code]
var kitten = function(parameter) {
console.log(parameter);
}
kitten(“this is an argument”);
[/code]

Arguments: allow you to put any data within the function when you call it.”

You should also make sure you understand what the DOM (Document Object Model) is and how you can manipulate it!

Solution: Reading & practice.
Sexy, we know.

If you are looking for online options we recommend JavaScript for Cats and Girl Develop It’s presentation on JavaScript fundamentals. If reading books is more your jam, we recommend grabbing a copy of JavaScript: A Visual QuickStart Guide.

Mistake #3: Fearing Regular Expressions

Alright, at first glance, Regular Expressions are definitely intimidating. But just remember, they are a formula and you just have to understand how they get pieced together.

And the payoff is BIG. Regular Expressions let you know all kinds of things from making sure someone is submitting a valid email to responding to specific words, phrases, or code snippets that your users are inputting (Regular Expressions power our HTML Awards game).

Plus knowing your way around a Regular Expression will give you some seriously cool street cred.

Solution: Read up on Regular Expressions & lots of deep breathing

Check out Mozilla’s introduction to Regular Expressions and download this handy JavaScript RegEx cheat sheet.

Mistake #4: Thinking that JavaScript is a
lightweight programming language

JavaScript may be a good programming language for beginners, but that doesn’t mean its not a major player when it comes to programming for the web.

The last few years have seen an enormous developments in the JavaScript space. Projects like Handlebars.js have made it possible to create frontend templates using JavaScript and JSON, frameworks like Backbone.js and Ember.js are powering the development of thousands of super powerful web applications, and Node.js is even making it possible to build servers out of JavaScript. So watch out!

Seriously, if you are going to be on ONE horse, JavaScript is the horse to bet on. And as a side benefit, as we mentioned in our video on Tuesday, once you’ve mastered JavaScript, you are going to find learning new programming languages much easier.

Solution: Rest assured that JavaScript isn’t just for kiddies (although kiddies like it too!)

Mistake #5: Not subscribing to Peter Cooper’s
JavaScript Weekly newsletter

Alright, so this is less of a mistake and more of a direct plug. Peter Cooper’s JavaScript Weekly newsletter is the best way to keep up-to-date on what’s happening in JavaScript. Where else could you think about how Ernest Hemingway would write JavaScript or  learn what 5 things you need to stop doing with jQuery?

Solution: Go sign up!

Your email address will not be published.

0 comments

Want more articles like this?

Sign up to get the most recent tech news, tips and career advice.