GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — 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.

BranchesTags
Open more actions menu

Latest commit

 

History

51 Commits
51 Commits

Folders and files

NameName
Last commit message
Last commit date
scripts
scripts
 
 
.gitignore
.gitignore
 
 
001_0_data-types-and-operators.md
001_0_data-types-and-operators.md
 
 
001_1_data-types-objects.md
001_1_data-types-objects.md
 
 
001_2_data-types-arrays.md
001_2_data-types-arrays.md
 
 
001_3_data-types-functions.md
001_3_data-types-functions.md
 
 
002_0_statements-and-loops.md
002_0_statements-and-loops.md
 
 
003_0_error-handling.md
003_0_error-handling.md
 
 
004_1_currying.md
004_1_currying.md
 
 
005_0_scope.md
005_0_scope.md
 
 
005_1_this.md
005_1_this.md
 
 
006_0_OOP.md
006_0_OOP.md
 
 
007_0_closures.md
007_0_closures.md
 
 
00_0_intro.md
00_0_intro.md
 
 
00_1_variables.md
00_1_variables.md
 
 
README.md
README.md
 
 
Z_00_0_basic-es2015.md
Z_00_0_basic-es2015.md
 
 
Z_00_0_basic-oop-with-js.md
Z_00_0_basic-oop-with-js.md
 
 
Z_00_0_callbacks-promises-async_await.md
Z_00_0_callbacks-promises-async_await.md
 
 
async.md
async.md
 
 
package.json
package.json
 
 

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
    • Objects
    • Arrays
    • Functions
  • Statements and Loops
  • Error handling
  • Currying
    • Currying is not partial application
    • A generic curry, and how it knows when to stop
    • Where that breaks
  • Scope
  • This
  • OOP
    • Fundamentals of OOP
    • Inheritance
    • Polymorphism
  • Closures
  • Async JS
    • Callbacks
    • Callback hell
    • Promises
    • Promise.all, Promise.race, Promise.resolve
    • Async/Await

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.

  • OOP with JS
    • Creating or initializing objects
    • Adding properties
    • Removing properties
  • ES6 or ES2015
    • let and const
    • Template literals
    • Destructuring assignment
    • Arrow function
    • Classes
  • Callbacks, Promises and Async/Await

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-awaitclosureses6javascriptjavascript-es6learn-javascriptlearningnotesoop

Resources

Readme
Activity

Stars

97 stars

Watchers

1 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.