GitHub - alpersonalwebsite/learn-javascript: JavaScript notes in one place: data types, statements and loops, error handling, scope and this, OOP, closures, callbacks/promises/async-await, ES2015 and patterns.
Repository navigation
learn-javascriptPublic
About
JavaScript notes in one place: data types, statements and loops, error handling, scope and this, OOP, closures, callbacks/promises/async-await, ES2015 and patterns.
Topics
async-await closures es6 javascript javascript-es6 learn-javascript learning notes oopResources
Readme ActivityStars
97 starsWatchers
1 watchingForks
1 fork Report repositoryBranches
Tags
Go to Branches page Go to Tags page
Latest commit
History
51 Commits
View commit history for this file.
Folders and files
Repository files navigation
Learning JavaScript
IMPORTANT : Until new advise this will be more a collection of notes than a structured breviary.
In 2018, the CTO of the company I was working for, entrusted me with the task of moving from unorganized JS to a JS MVC-ish implementation with React. For this purpose I created a repository to highlight some concepts and summarize the framework. It worked well (well enough), however, I found myself constantly going back and forth between React and JavaScript, something that polluted other training materials like Node (environment), Express (library), Vue (framework)... All these tutorials shared something in common: the language, JavaScript.
Looking back, I see several repetitions that are not strictly related to the topic of some of those essays, but you definitely need to understand them before moving on. Someday I will make time to do a cleanup, but erstwhile, I need to consolidate all that knowledge in one place. This is learning JavaScript.
Checking the samples
The samples here are not decoration, they are claims. A line like
console.log(typeof 'literal'); // string
says something about what JavaScript does, so the claims are checked rather than trusted: every
block is parsed, the self-contained ones are run, and each trailing comment is compared against what
actually came out. A note that says // 5 over a line that prints 6 fails the build.
npm run check-samples # parse, run, and verify the stated output npm run check-links # every relative link and #anchor resolves npm run check # both
No dependencies to install and no network needed. The checkers use only what ships with Node, and scripts/check-samples.mjs explains what it does and does not verify, including the blocks it deliberately skips and why.
Table of Contents
- Intro
- Variables
- Primitive Data Types and Operators
- Reference Data Types
- Statements and Loops
- Error handling
- Currying
- Scope
- This
- OOP
- Closures
- Async JS
Older notes
These four came from the earlier repositories described above, before any of this was consolidated, and they have not been merged into the numbered files. They overlap: OOP is covered both here and in OOP , and async both here and in Async JS . Where they disagree in depth, prefer the numbered files, which are the newer pass. They are kept because they are not strictly a subset, and rewriting 1000 lines of prose to merge them would introduce more errors than it removed.
About
JavaScript notes in one place: data types, statements and loops, error handling, scope and this, OOP, closures, callbacks/promises/async-await, ES2015 and patterns.