DEV Community

Cover image for I thought I knew JavaScript …
Antonio Villagra De La Cruz
Antonio Villagra De La Cruz

Posted on • Updated on • Originally published at antoniovdlc.me

I thought I knew JavaScript …

… until I failed a technical interview I thought I aced!

The first time I got in touch with JavaScript was when it was still cool to use ViewSource to learn how a website was built. It was also the time when JavaScript was mostly used for DOM operations. Therefore, in a burst of wisdom, I decided that it was an ugly language and that it wasn’t worth learning it (I already had some good knowledge of PHP). A few years later came my first internship where I was developing hybrid mobile apps … in JavaScript! During that internship I learnt that JavaScript was a lot more than just the DOM API, and I loved it! As Eric Elliott would say, there is this sense of freedom in JavaScript that makes it a fantastic language.

Even though I studied computer science, JavaScript was never really taught in class (even during the web development class) and so, at first my style was such that it could have only been described as “StackOverflow copy-paste”. I quickly learnt there was a ton of frameworks out there to help you code in JavaScript, and so I jump into them, heavily using the likes of jQuery, Backbone, Underscore and Require even for the most trivial piece of code. And because I was able to build all those awesome apps without any previous knowledge of the language I thought I was great … until I failed a technical interview for a junior web developer position, their reason being that they “didn’t like my style of programming”.

So, if you are at the point where you have been using JavaScript for a year or two without having really taken the time to learn it and you finally found the need or the will to do so, here is my little piece of advice:

  • Get back to the basics of the language

If you have learnt JavaScript the way I did, you probably have a very vague idea of the basics of the language. You know how to do things because you’ve seen it in the code you have been maintaining or because you copy-pasted it a dozen times from StackOverflow. Therefore, the typical tutorials for beginners might be a bit too easy for you. Nevertheless you would need a quick and in-depth overview of the language! Worry not, here is something for you by Dr. Axel Rauschmayer: Speaking JS.

  • … and then go beyond!

Once you have reviewed the basics of JavaScript, going beyond is not always easy either. There aren’t that many advanced material available that don’t just go into the tiny tedious little details of the language.

A good transition would be to read and listen to what Doug Crockford has to say about JavaScript and then to look into the very insightful You Don’t Know JavaScript series.

Also, an incredibly valuable source of information is the Mozilla Developer Network, which is my go-to anytime I need to check what methods or properties a native object has, or what is the difference between call() and apply()!
And if you think you’ve mastered it all, try this: http://ejohn.org/apps/learn/!

  • Keep yourself informed about what’s going on in the community

Finally, try to stay in touch with the evolutions of the language. I personally highly appreciate the JavaScript Weekly newsletter, which digests most of what has been going on in the community in a simple email with links to dozens of blog articles.

Of course, don’t forget to experiment a lot as well, because I believe there is no better way to learn than by doing!

Top comments (19)

Collapse
 
joshuangomeli profile image
Joshua Ngomeli

Great advice

Collapse
 
niharmore33 profile image
nihar • Edited

In my experience, a two-fold approach works well: vigorous study combined with practical experience.
You can learn JavaScript here: hackr.io/tutorials/learn-javascript

As far study goes, some books and sites are better than others, but you could hardly go wrong going through the entirety of Eloquent Javascript ( eloquentjavascript.net/co... ). The online version has amazing interactive examples and exercises. Upon completion, Cody Lindley's JavaScript Enlightenment ( javascriptenlightenme... ) is a solid read for the intermediate JavaScripter. Lean heavily upon the MDN's JavaScript docs ( developer.mozilla.org/en... ) and try to avoid W3 Schools ( for reasons why, see w3fools.com/ ).

Concerning practical application, the best advice is to build something. Anything. Decide upon a simple problem to solve, and attempt to solve it. JS Fiddle ( jsfiddle.net/ ) is a great testing ground, and makes it easier to share and collaborate on examples. Read other people's source, change it, break it, fix it. Become intimately acquainted with WebKit Developer Tools' JavaScript console and Firebug's JavaScript console.

There aren't really very many shortcuts, though it is easier than it has ever been to learn to write solid JS. Practice makes perfect. :)

Collapse
 
codefoodpixels profile image
Luke Bonaccorsi

For practice, my suggestion would be to write something that you personally find cool/interesting. Doesn't have to be for anyone else, hell doesn't need to be for the web even.

The project where I've learned the most about JavaScript is on a chat based automation system I've written (and re-written). Build something weird and interesting that will get you enthused about what you're doing.

Collapse
 
ben profile image
Ben Halpern

Wonderful advice.

Collapse
 
deen_john profile image
Deen John

Besides reading JS books,MDN,watching videos ,

I found digging into Underscore,lodash,jquery source code very helpful.There is so much good stuff to learn in these libraries.
If you can write most of these libraries functions in vanilla javascript then you are good.
Like this: github.com/oneuijs/You-Dont-Need-j...

Collapse
 
antoniovdlc profile image
Antonio Villagra De La Cruz

I actually wrote and published this article a couple of years ago on Medium, but I thought it might be a good first post here on dev.to()! 🙂

Collapse
 
johnkazer profile image
John Kazer

You got more feedback and responses in dev.to :-)

Collapse
 
ben profile image
Ben Halpern

Still super valuable!

Collapse
 
vicxxx profile image
VicXXX

I think this article would be more insightful if you actually said what was the technical interview questions you actually failed.

Everyone fails it's a common thing you can only learn from your failures and do better next time. Also a technical interview for a junior developer and they fail you on we don't like your style????

That is ridiculous theres a reason why it is called "junior" you are meant not to have a clue and eventually gain experience and learn from the projects you build.

What was the exercise and what did you come up with?

Collapse
 
niharmore33 profile image
nihar

My Advice:
Learn Javascript fully. Know what an Object prototype is, how scopes work, how the 'this' concept works
Don't copy and paste code while learning, write the code (unless you are repeating the same block all the time). Don't assume that you could write that code on the book. It's the only way you'll become familiar with the syntax and notice the common errors.
Listen to Javascript podcasts, and give chance to some Javascript Tutorials to reach you through youtube or any other source you prefer.
Be patient. The moment you google something, you'll see a lot of results including some javascript libraries that have simplified what you are looking for. Avoid those options if you are still learning
Build stuff that you are proud of. Even the simplest 'Hello world' javascript script can got to your github. Use that to track your progress. Don't track your progress against advanced Javascript developers. Remember, they all started at the same level
Don't forget to develop your testing skills. Javascript does not have a compiler, make sure you get into the habit of testing all your code before it's too late.

Best way to learn Javascript (Worked really well for me): hackr.io/tutorials/learn-javascript

Collapse
 
kabashe profile image
Kabashe

learn OOP concepts like really learn them and meditate them
and always learn to code and code to learn

Collapse
 
chieftwopencils profile image
Robert Wilk

It's, at least, equally beneficial to learn the functional concepts.

Collapse
 
carlflor profile image
Carl Flor

Such a timely article for me! Thanks for this. :)

Collapse
 
christiankaindl profile image
Christian Kaindl

In fact, the DOM API itself is not part of the JavaScript specification. It is supplied by the host environment, in most cases the browser.