TIL/2020–12–25

Today is my 13th day learning with Treehouse’s Full Stack JavaScript Techdegree. I learned a bit more on the history of JavaScript, different types of JavaScript and more. I believe it is also good to learn about the foundation of what I am pursuing.

These are my notes:

Landscape of JavaScript — History of JavaScript

  • Began in May 1995
  • Netscape Communications made the first commercial web browser — Netscape Navigator
  • Marc Andreesen (founder of netscape) — wanted to make the web more interactive — more livelier
  • Mocha (Early name for JavaScript) -> LiveScript -> JavaScript (Connected to Java because it was the popular language at the time, hence called JavaScript as a promotional stunt)

JavaScript as a Cross-Platform Language

  • Native apps on iOS and Android
  • Desktop Apps (Slack and VSC are built on JavaScript)
  • Virtual Reality (Airbnb)
  • IoT(Internet of Things) — any physical device with an on/off switch that can connect to the internet and with other IoT devices (Fitbit, Alexa)
  • Machine learning

The evolution of JavaScript

  • When netscape released JavaScript it instantly became a game changer in web-user experience so other competing companies wanted to create their own version of it
  • Microsoft — JScript
  • Programmers would have a difficult time programming in Netscape and Internet Explorer because they were totally unrelated — a site that worked in netscape wouldn’t work in internet explorer and vice versa — developing a site that worked in netscape and IE was extremely difficult, time consuming and expensive — because of this JS got a reputation for being a roadblock to moving the web forward
  • There were no rules and guidelines — JS was not standardized
  • In 1996, netscape decided to standardize JavaScript and submitted JS to ECMA international (standards organization for information and communications system)for consideration as an industry standard — ECMA Script because the official term used to refer to versions of the language
  • Ecma TC39 — Committee that decides on the evolution of JS ES1 in 1997 ES2 and ES3 followed in the later years
  • In 2003, because of major differences concerning language complexity and on how JS was to move forward — work by the committee had stopped and TC39 broke up — many of the proposed features were dropped and for years there were no major changes to the language and no real push for a new release for the ECMAScript Standard.
  • In 2008 the TC39 regrouped, to work on ECMAScript 3.1 which was later renamed to ECMAScript 5 — introduced a number of features to the language like support for JSON, Setters, Getters, filter(), forEach(), map(). ES5 is the version of JS that is fully supported by all browsers to this day.
  • Although ES4 was abandoned, some of its features were added to ES6 — largest upgrade of the language and the biggest milestone for JS
  • ES6 was finalized in 2015 which made it known as ES2015
  • TC39 responsible for authoring the spec and evolving the programming language — by deciding what features gets added to the language
  • TC39 is made up of delegates from different companies including major browser vendors and big companies like netflix, paypal, facebook
  • Creating approving or denying language proposals

The different flavors of JavaScript

  • Vanilla, Plain, Pure JavaScript: the use of JavaScript without any frameworks or libraries. In other words, native standards-based JavaScript
  • After 2016, the JavaScript language has continued to evolve year after year — a new version of ECMAScript gets released every year with any features that are ready at that time.

Vanilla JavaScript

  • ECMAScript 5 — ES5
  • ES6 — ES2015
  • Future versions that have not yet been released are referred to as ES2016, ES2017, ES2017

Type Checkers for JavaScript/ Type Checking language

  • TypeScript -developed by Microsoft
  • Flow -developed by facebook

Other languages that use a different syntax:

CoffeeScript: Designed to make JavaScript easier to read and express

Dart: OOP developed by google, create complex and highly scalable apps for the web, mobile devices and IoT

— — -

How does JavaScript code run?

JavaScript:

Dynamic programming language: a language that executes during runtime

In JavaScript you can manipulate almost everything at runtime. You are able to create new variables, change the underlying type of a variable, create new functions, redefine existing functions and more.

Browser: one of JavaScript’s most common runtime environments

Interpreters/JavaScript Engines:

  • SpiderMonkey powers firefox
  • Chakra powers IE and Edge
  • V8 powers Chrome

Job of JavaScript engine:

  • Parse and execute JavaScript Code
  • The JS Engine has a compiler called the Just In Time compiler which complies your JavaScript code into machine code
  • Monitoring the code as its running — runtime compilation

Other Non-Browser environments:

  • Node.js

What text editors do JavaScript developers use?

Visual Studio Code:

Linters: reads your code to help you avoid problems and stop errors (ESLint)

Code formatters: Maintains overall quality by having a consistent style

Build Systems:

  • Package managers: a collection of software tools that automates the process of installing, upgrading, configuring and removing computer programs from a computer’s operating system in a consistent manner.
  • Module bundlers: When you have a lot of dependencies, frameworks, libraries that you’re using, a module bundler combine all your source code into a single minified JavaScript file before its served to the browser
  • Compilers: Translates your code (Special syntax like coffeescript) into JavaScript code for the browser to understand
  • Task runners: Defines and runs common tasks in your project — anything you might do over and over again

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store