Random knowledge about Javascript and Typescript
Javascript is a programming language that is used primarily on the web. It is interpreted by web browsers in order to process and display data on web pages. Javascript is also known as ECMAScript, after the standard that encompasses a formal definition of the language.
In 2018, Javascript usage goes beyond the web itself and includes many so-called “backend” applications, written in frameworks such as Node.js. Many people learn Javascript as their first programming language, while working on websites and the web. Javascript is also known to be a somewhat frustrating language to work with, because it lacks certain features such as “static typing”. One variation of Javascript that includes type information is called, appropriately, Typescript. Typescript was developed by engineers at Microsoft in order to create a version of Javascript that includes type information.
The “type” of a variable or function is basically the format of the information that it contains or returns. The number 123 is a “number” in this sense, whereas the letters “abc” are considered a “string”. By assigning data types to your variables, you can automatically check whether or not you are passing the right “type” of thing into a function or method. So for example, what if you had a Person object that had a setName method? You wouldn't want to set the person's name to a number, or to an Array. You'd want to set it to a string. The Typescript compiler can let you know when you've accidentally tried to pass such nonsense to a function that doesn't accept it.