Programming is the process of creation of executable computer programs. Doing such requires a certain
language, source codes can be written in 1 or more
programming languages. Some examples are
JavaScript,
HTML5,
PHP,
Python and
Ruby. The following text will teach you some things you should know for learning
JavaScript.
Where to learn programming?
Many people are interested in programming but yet they do not know where they could learn a language. Excluding learning in an institution, the most common way to learn might be through programming websites. Nowadays there is a wide variety of online courses which teach you a programming language, usually being focused in a single one or a bunch. Talking about JavaScript, some which you could visit are:
- W3Schools: W3Schools is a web developers site, with tutorials and references on web development languages such as HTML, CSS, JavaScript, PHP, SQL, and JQuery, covering most aspects of web programming.W3Schools has focus on simplicity, practicing easy and straight-forward learning. It uses simple code explanations, and illustrates how to use it. The tutorials start from basic level, and move all the way up to complete professional references. I personally recommend this website to anybody who already knows the basics of programming in JavaScript or is looking to begin. To visit the page, you can click the logo.
- Codecademy: Codecademy is an online interactive platform that offers free coding classes in 9 different programming languages including Python, PHP, jQuery, JavaScript, AngularJS, and Ruby, as well as markup languages HTML and CSS. Codecademy also provides a forum where enthusiasts, beginners, and advanced coders can come together and help each other. Each individual who joins has their own profile. To motivate users to participate, the site offers feedback, badges for completing exercises, as well as a function that keeps track of a user's total score and total day streak, and displays it to others. I only recommend this website for those looking forward to learning the basics of JavaScript, as the internal editor only supports basic operators and methods. If you would like to visit the website, you can easily do so by clicking its logo.
- Sololearn: Sololearn is an online platform which offers different programming languages courses and about other things. For example: JavaScript, CSS, HTML, Excel, Photography and C++. Overall, although the content proved to be correct, the lessons move way to fast. Nobody without previous knowledge in programming could take part of this course of JavaScript and complete it. The explanations are usually short, way too summarized and hard to comprehend. On the other hand, it offers a video explanation of all the content so you can have extra information. I do not recommend this course to anyone looking forward to start programming. Instead, Codecademy or W3Schools can be a better option. If you wish to visit Sololearn, you can click its logo.
Where to write the code?
JavaScript code can be written in any text editor. Even basic ones, like notepad, can be used. The only requirement is that when you save the file, you write ".html" at it's end to choose the format. Other text editors can be used, depending on your preferences. If you want to be more professional, you shouldn't use notepad and instead look for a more professional program. You will probably want to create something after you have learnt the basics. I totally support people who try to code something by themselves. Nevertheless, do not let that draw your attention from learning. The best thing you could do is learn what's possible with a
language and test it as you know about it. Once you know the possibilities, try coding your own program and learn even more advanced stuff.
How to debug my code?
Often, everyone gets a mistake in their code that doesn't allow them to run the program. There are multiple ways to debug your code. If you are looking for an online debugger, you could use
Python Tutor. This website lets you visualize step by step your code and spot errors. It supports
Python,
JavaScript,
TypeScript and
Ruby. Moreover, you can temporaly disable your code by using comments. This way, you can aislate parts of your code and run part of it. If it still doesn't run, you know that the bug is in the rest of the code (supposing there's only one error). Another option are "flags". If your code runs correctly, but in a moment it gets an error and stops running, you can print random text in a console every some lines so you know up to where the code is correct. Finally, some
programming languages offer a debugger, allowing you to spot mistakes and act according to it.
Sources