24
Do you want to master JavaScript?
In previous lessons we covered important parts of HTML and also much of the Styling world (CSS, SCSS...).
Now let's go deeper in the JavaScript world, as a touchdown we'll ask some common questions that you may or not asked but definitely you need to know.
What is JavaScript?
JavaScript is one of the most popular and widely used programming languages right now. It's growing faster than any other programming languages and big companies such Uber, Netflix, Paypal, NASA... build internal applications around JavaScript.
The average salary of a JavaScript developer in United States is around 72.000 U$D a year so it's a great opportunity to get a good job out of learning JavaScript. You can work as a front-end, back-end or full-stack (who knows both the back-end and the front-end) developer using JavaScript only.
What can you do with it?
For a long time JavaScript was only used in the browsers to build interactive web pages. Some developers refer to javascript as a toy language but those days are gone because of huge community support and investments by large companies like Google or FaceBook.
These days you can build full-blown web or mobile apps as well as real time networking applications like chats, video streaming services, command-line tools or even games.
Where does JavaScript code run?
JavaScript was originally designed to run only in browsers so every browser has what we call a JavaScript Engine that can execute JavaScript Code. For example the engines in FireFox and Chrome are SpiderMonkey and V8 (respectively)
In 2009 a very clever engineer called Ryan Dahl took the open source JavaScript engine in chrome and embedded it inside a C++ program. He called that program Node. So Node is a C++ program that includes Google's V8 engine and now with this we can run JavaScript code out of a browser so we can pass our JavaScript code to Node for execution and this means with JavaScript we can build the back-end for our web and mobile applications so in a nutshell, JavaScript code can be run inside of a browser or in Node (or in any place where you have a JS runtime environment)
Browsers and Node provide runtime environments for our JavaScript code (that's just what Node is, not a framework, not a lib... we'll talk about this on a future post).
JavaScript vs ECMAScript?
ECMAScript is just a specification while JavaScript is a programming language that confirms to this specification, so we have this organisation called ECMA which is responsible for defining standards. They take care of this ECMAScript specification.
The first version of ECMAScript was released in 1997, then starting from 2015 ECMA has been working on annual releases of a newest specification. In 2015 they released the ECMAScript (or ES to simplify) 2015 -> ES2015, which is also called ECMAScript 6 or ES6 for short.
This specification defined many new features for JavaScript (classes, enhanced object literals, template strings, destructuring, default + rest + spread, let + const, iterators + for..of, arrow functions...).
Footnotes:
All the content of the following posts will use ^ES6 as reference. We'll talk about Loops, Maps, Reducers, loops, Bitwise operators and so on so to first get a deep knowledge of JavaScript programming language and then we'll jump into Node.js APIs (RESTful, GraphQL) then we'll add relational and non-relational databases and finally React or Preact for the frontend which is the tech stack with the most demand. stay tunned if you want to master JavaScript! :)
24