- Why languages?
- Interpreted vs compiled languages
- Why JS >> Other languages in some use-cases
- Static vs dynamic languages
- Single threaded nature of JS
- Simple primitives in JS (number, strings, booleans)
- Complex primitives in JS (arrays, objects)
- Functions in Javascript
- Practice problem solving
- Callback functions, Event loop, callback queue, Asynchronous programming
- Callback hell and Promises
Why can not we have one language do it all? We have different languages but they eventually go through the compiler to become one language which is 0s and 1s.
JS is interpreted, unlike C or Java. You write and just run the file, the whole JS file, unlike in C where you have to run a compiled output file (which is what a compiled language does.) This interpreted natire of language allows for partial execution.
Execute node <filename>.js
in your terminal.
Example: node main.js
Browsers can only understand HTML/CSS/JS (not technically true) Thanks to Node.js, Javascript can also be used for "Backend Development"
JS is loosely typed, you can assign one variable to different types of data. Which is frowned upon, hence the advent of TypeScript.
JS is always run on a single core, so you can not really split up work contextually between different cores. Hence it is a bad language to use on/for scaleable systems.
The use of var is deprecated. Look at the code to understand the use of let, var, and const.
I will update the README soon... I have final exams (sad emoji)