A Smarter Way to Learn JavaScript Online

A Smarter Way to Learn JavaScript is to learn and understand the concepts of JavaScript language first. If you are someone who knows a little about HTML, CSS and some other programming language, but wants to learn JavaScript, this is not a very difficult task for you. There are lots of tutorials on the internet, you can follow.

Is it heard to learn JavaScript?

The answer is may be it is or may be not. This totally depends on you. If you have some experience in any programing language you can learn JavaScript more easily.

You have to grow your coding experience in a different way. Experience is something that we have to acquire through hard work. We can’t get experience in one hour or one week.

Do you have any level of expertise on any programming language?

Have you ever solve any complex algorithm in any language or have you ever worked with a large project in .Net or java? If yes then a little amount of time invest and some good tutorial will help you to learn Javascript easily.

How can I learn JavaScript fast and easy?

To be honest, there is no shortcut to be learned JavaScript or any programming language fast and easy way. To learn JavaScript fast and easy way is by writing your code again and again until you master the main concept.

First, learn JavaScript basic commands and syntax. If you have a little amount of knowledge in programming, i.e. What is Variable, what is a loop, how to use if condition etc, you can easily learn the JavaScript syntax? Every programming language has its own syntax. So if you are aware of that above topic, then your JavaScript learning curve will be simpler.

There is a method called “trial and error” which is very effective to learn any programming language. First, think about your goal and also think how to achieve this. Then convert it as JavaScript language.

Here are the few steps you should follow when learning JavaScript programming

Use notepad as your code editor.

I would suggest using plain notepad when you learn JavaScript. You may use special code editor like notepad++, sublime but I will recommend you to use plain notepad instead of the special code editor.

The special code editor has some features like autocomplete which will show automatically when you enter some character. Do not use this when you are a beginner. If you practice that way, you will get some confusion when writing your code. For example there is a function called getElementById(). You are practising your code in some special code editor where autocomplete features is present. So when you write “get” it will show different suggestion. You select getElementById() . This will help you to code more faster.

Now if you are using only note pad, and you type getElementbyId() (letter “b” in “by” is small caps). You will get some error like below-

Uncaught TypeError: document.getElementbyId is not a function

As this is case sensitive, you have to always follow the exact function name. You are practicing in code editor. That’s why you may not give attention to this small things. So first practice on plain note pad then use special code editor.

Your JavaScript code should be well documented-

Now as a beginner when you write your code, always use a comment. The comment will help you to understand what is the purpose of this code. It may help other developers also to understand the logic. Suppose you have written a code a long time ago. Now you need to edit the code. Sometimes you can’t recognize the purpose of that code, why it was written for.

So the comment will help in this case. One more thing, lots of beginners write meaningless variable name-

var skjsd = 10;
var kjk = 20;
var lklk = skjsd + kjk;

This is not a good practice when you learn JavaScript. If you declare those variables like var firstNo, secNo, result, it will make sense. So avoid meaningless variable name.

Don’t use unnecessarily complex code-

If the code is simple it will be very easy to maintain. Unnecessary complexity will make your code tough to update or add new features.

Don’t write slow code-

You may ask if code is slow then why it present in JavaScript language? Well, there are several functions which can make your code slow. Slow code can affect your website performance. It will increase the loading time of your website. So try to change your logic so that your code can run faster.

Don’t repeat yourself (DRY) when you are learning JavaScript-

There are lots of situation will come when you writing a script that you need to write the same script again and again. So it will make your code unnecessary long and slow when your browser execute the script.

So always avoid same code again and again. Try to write a function and call it when you need.

Use Inspect Elements to read your error-

A Smarter Way to Learn JavaScript also depends on how you catch your error code from the console window. If you are beginner this is natural you are going to make mistake. To get the error you need to learn how to use Inspect Elements.

All modern browsers provide Inspect Elements to check the error and change anything runtime. If you want to inspect in Google Chrome, right-click on the webpage and click “Inspect” or you can press Ctrl+Shift+I to show the Inspect element window.

I have shown previously that if you write getElementbyId(), your code will not going to work. You can get the error from Inspect Element’s Console tab.

A Smarter Way to Learn JavaScript inspect Element

Some sources to Learn JavaScript Smarter Way

There are lots of online sources you can learn JavaScript. You can follow websites, online lesion video about JavaScript or there are lots of pdf you can read. There is a popular book at Amazon A Smarter Way to Learn JavaScript you can purchase. Below are some popular websites you can follow.

Mozilla JavaScript Guide:

You can follow the link Mozilla JavaScript Guide to learn JavaScript. This website will show you how to use JavaScript and the total overview of this language.

w3schools :

The best beginners guide to learn JavaScript is w3schools. You can learn the JavaScript simple way from that website. The website has a feature called “Try it Yourself”. You can easily edit source code and run the code to get the result.

A Smarter Way to Learn JavaScript - w3school

Try to read the topic what I have marked out with red color and practice more.

Stack Overflow:

Suppose you are writing a code in JavaScript and you stuck. You don’t understand the logic to solve the code. The Stack Overflow will help you in this case. Lots of users are active there. You can ask your question there. So you can learn JavaScript by asking your exact problem there.

When you ask your question, keep one thing in mind that you have to show your code mean what you have tried. It will help other experts to answer your question.

Should I learn JavaScript frameworks?

If you are a beginner then you may don’t know what is JavaScript framework. There are many JavaScript frameworks available in the market i.e. jQuery, Angular,  React, Node.js etc.

What is the difference between Core JavaScript and JavaScript frameworks?

A JavaScript framework is totally based on pure JavaScript language. But the main purpose of JavaScript framework is to add ready to use features. It will help you to write any code faster and short.

So the conclusion of A Smarter Way to Learn JavaScript first learning the pure JavaScript, then try to use javascript framework.