Javascript
Javascript is a rich language that is continously evolving iterating with each "ES" (ECMAScript) version that is introduced every few years. It deserves it's own section. ES versions are determined by a collective group of people, proposals to the ES language are submitted here.
History​
- How Web Apps Work: Javascript and the DOM read the section titled "Language Evolution"
Knowledge​
- introduction to Javascript
Core Topics​
primitive types :​
null
- the
typeof null
returns anobject
type due to a bug - for intentional unknown values
- the
undefined
- for unintentional unknown values
- undefined vs. null
Booleans
Numbers
NaN
(Not a Number)- interesting value for representing non numbers
NaN === NaN //false
BigInts
Strings
Symbols
Function
Objects
closures​
- JS functions remembers variables and values outside of it's scope, during creation
- Kyle Simpson
- mdn
hoisting​
- all variable declarations anywhere in the code are treated as though if they were already declared, or compiled first
it would be like a global header file for C++ that contains all variables ever declared in your program
- Kyle Simpson
- mdn
values & reference​
pure functions​
- functions that have no side effects like logging or making a network call, everything happens within the confines of that function
- also "given the same input, will always return the same output" - Eric Elliot Medium src
- mutations, and pure functions
Iterators & Generators​
Advanced topics​
Arithmetic​
floating point map is used instead of conventional mathematics
Event Loop​
Tools​
- jsdoc
- great for documenting js code
- TypeScript
- typed javascript
- error and type checking
Linting​
- AirBnb Style Guide <-- personal preference
- Google Style Guide