1. Install node js and npm on your computer. To accomplish this, spread the terminal and type node -v. If the version is 0.8 or higher, you’re good to go. If not, download node js from the website, and install it. And then, make sure the new version is 0.8 or higher by typing node -v again in the terminal.
2. Learn about and read a programming tutorial or two. There are many available online, including Codecademy’s interactive tutorials that allow you to code right in your browser, YouTube videos explaining how things work, and sites like w3schools that offer plenty of information for beginners looking for a place to start learning the basics of coding.
4. Keep practicing with other beginner tutorials until you feel comfortable with syntax basics like if statements, loops, and conditionals.
5. Find a problem that needs solving (or something personal).
6. Come up with a solution to the problem.
7. Break it down into parts.
8. Code each part separately.
9. Put also all the pieces together.
10. Repeat steps four through nine.
Write code, don’t read it
- var a = 1;
- console.log(a); // 1
- var b = 2;
- b = 3; // 3 (prints out in the console)
console.log(b); // 3 is not equal to 1, and you’ll need to read up on how variables work if you want your code to make sense! An object is an unordered list of key/value pairs: var obj =; The curly braces are used to indicate that this line defines an object with one property named ‘name’ that has a value of ‘Mickey Mouse, and one property named ‘height’ that has a value of 100.
If you also have more than one pair, each pair must be separated by a comma, as in this example: var obj2 = ;
A function can return values too!
Stop memorizing and start understanding.
Memorizing the syntax is also not enough. You have to understand how programming works. There are also a lot of math, logic, and abstract concepts involved in coding that you need to grasp before you can get anywhere with it. Memorizing syntax is useless if you don’t know what’s happening behind the scenes. The same goes for any skill: without understanding, memorization is worthless. So if you want to start learning how to program, stop memorizing and start understanding.