JavaScript · Foundations
Learn JavaScript
The syntax and the mental model. Short, runnable, no fluff.
Learn the Basics
01
Hello, World!
Welcome to the first tutorial. In this tutorial you will learn how to write your first line of code. JavaScript is a very powerful language.
02
Variables and Types
JavaScript is dynamically typed, so a variable can hold any value. Declare with const by default, let when you need to reassign.
03
Arrays
JavaScript can hold an array of variables in an Array object. In JavaScript, an array also functions as a list, a stack or a queue.
04
Manipulating Arrays
Arrays can also function as a stack. The push and pop methods insert and remove variables from the end of an array.
05
Operators
Every variable in JavaScript is casted automatically so any operator between two variables will always give some kind of result.
06
Conditions
The if statement allows us to check if an expression is equal to true or false, and execute different code according to the result.
07
Loops
JavaScript has two methods for running the same code several times. It is mainly used for iterating over arrays or objects.
08
Objects
JavaScript is a functional language, and for object oriented programming it uses both objects and functions, but objects are usually used as a data structure, similar to a dictionary in Python or a map in Java.
09
Functions
Functions are code blocks that can have arguments, and function have their own scope.
10
Pop-up Boxes
There are three types of pop-up boxes in javascript: confirm, alert, and prompt.
11
Callbacks
Callbacks in JavaScript are functions that are passed as arguments to other functions.
12
Arrow Functions
Arrow functions are a feature of ES6, their behavior are generally the same of a function.
Advanced Tutorials
01
Object Oriented JavaScript
JavaScript uses functions as classes to create objects using the new keyword.
02
Function Context
Functions in JavaScript run in a specific context, and using the this variable we have access to it.
03
Inheritance
JavaScript uses prototype based inheritance.
04
Destructuring
Destructuring is a feature of ES6, introduced for making easier and cleaner some repetitive operations and assignments made in JS.
05
Promises and async/await
The single most important topic in modern JavaScript, and the one where generated code most often gets it subtly wrong.
06
Modules
How JavaScript code is split across files — and the CommonJS/ESM split that still causes more confusion than anything else in the ecosystem.
07
Error Handling
Throwing, catching, and the specific ways JavaScript error handling goes wrong — including the one that terminates your process.
08
Closures and Scope
The mechanism behind callbacks, module privacy, React hooks and most memory leaks. Worth understanding properly once.
Machine Learning in the Browser
01
TensorFlow.js
TensorFlow.js is an open-source hardware-accelerated JavaScript library for training and deploying machine learning models.
02
Convolutional Neural Networks with TensorFlow.js
Master computer vision with CNNs using TensorFlow.js.
03
TensorFlow.js Transfer Learning Tutorial
Transfer learning allows you to take a pre-trained model and adapt it for your specific use case with minimal training data.
04
Brain.js
Brain.js is a GPU accelerated JavaScript library for Neural Networks.
05
GPU Acceleration with Brain.js
Learn how to leverage GPU power for faster neural network training and inference using Brain.js GPU acceleration features.
06
Recurrent Neural Networks with Brain.js
Master sequence learning with RNNs and LSTMs using Brain.js. Perfect for text generation, time series prediction, and sequential data analysis.
07
ml5.js
ml5.js is a friendly JavaScript library for the browser that makes machine learning accessible to artists and creative coders.
08
ml5.js + Teachable Machine Integration
Learn how to create custom machine learning models with Google's Teachable Machine and integrate them seamlessly with ml5.js for powerful web applications.
09
Creative Coding with ml5.js + p5.js
Explore the intersection of machine learning and creative coding.
10
Creative Coding with ml5.js + p5.js
Explore the intersection of machine learning and creative coding.
Get the JavaScript agent pack
A battle-tested AGENTS.md, the review checklist, and the failure-mode cheat sheet for JavaScript. One email, then occasional updates when the tooling shifts. No course pitch.
AGENTS.md now — no email needed.