A JavaScript primer
As we already know Node.js is not just another language, but JavaScript. The language syntax and tools you are used to while coding JavaScript on the browser will work verbatim on the server. Node.js has additional tools that are only available on the server, but the language and syntax again are the same as JavaScript. I'm assuming you have a general understanding of the basic JavaScript syntax, but I will introduce JavaScript to you with a very brief primer on the language just in case.
In general, JavaScript is a fairly simple language when it comes to syntax, and you only need to know a few important elements.
Syntax basics
The most basic thing you can do in pretty much any programming language is declare a variable. Unlike most other languages, JavaScript is a dynamically typed language, which means when you declare a variable, its value can be of any type and can change during the course of its lifetime. However, in contrast, a strongly typed language dictates...