# Learn JavaScript > Free JavaScript tutorials with a runnable console, plus AI-native workflow guides for JS projects. Canonical: https://learn-javascript.org/ Licence: content free to read and quote with attribution to Learn JavaScript (https://learn-javascript.org/). Maintainer: Code Learning Dojo. Last built 2026-09-06. ## Foundations The syntax and the mental model. Short, runnable, no fluff. - [Hello, World!](https://learn-javascript.org/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. - [Variables and Types](https://learn-javascript.org/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. - [Arrays](https://learn-javascript.org/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. - [Manipulating Arrays](https://learn-javascript.org/manipulating-arrays/): Arrays can also function as a stack. The push and pop methods insert and remove variables from the end of an array. - [Operators](https://learn-javascript.org/operators/): Every variable in JavaScript is casted automatically so any operator between two variables will always give some kind of result. - [Conditions](https://learn-javascript.org/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. - [Loops](https://learn-javascript.org/loops/): JavaScript has two methods for running the same code several times. It is mainly used for iterating over arrays or objects. - [Objects](https://learn-javascript.org/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. - [Functions](https://learn-javascript.org/functions/): Functions are code blocks that can have arguments, and function have their own scope. - [Pop-up Boxes](https://learn-javascript.org/pop-up-boxes/): There are three types of pop-up boxes in javascript: confirm, alert, and prompt. - [Callbacks](https://learn-javascript.org/callbacks/): Callbacks in JavaScript are functions that are passed as arguments to other functions. - [Arrow Functions](https://learn-javascript.org/arrow-functions/): Arrow functions are a feature of ES6, their behavior are generally the same of a function. - [Object Oriented JavaScript](https://learn-javascript.org/object-oriented-javascript/): JavaScript uses functions as classes to create objects using the new keyword. - [Function Context](https://learn-javascript.org/function-context/): Functions in JavaScript run in a specific context, and using the this variable we have access to it. - [Inheritance](https://learn-javascript.org/inheritance/): JavaScript uses prototype based inheritance. - [Destructuring](https://learn-javascript.org/destructuring/): Destructuring is a feature of ES6, introduced for making easier and cleaner some repetitive operations and assignments made in JS. - [Promises and async/await](https://learn-javascript.org/promises-and-async-await/): The single most important topic in modern JavaScript, and the one where generated code most often gets it subtly wrong. - [Modules](https://learn-javascript.org/modules/): How JavaScript code is split across files — and the CommonJS/ESM split that still causes more confusion than anything else in the ecosystem. - [Error Handling](https://learn-javascript.org/error-handling/): Throwing, catching, and the specific ways JavaScript error handling goes wrong — including the one that terminates your process. - [Closures and Scope](https://learn-javascript.org/closures-and-scope/): The mechanism behind callbacks, module privacy, React hooks and most memory leaks. Worth understanding properly once. - [TensorFlow.js](https://learn-javascript.org/tensorflow-js/): TensorFlow.js is an open-source hardware-accelerated JavaScript library for training and deploying machine learning models. - [Convolutional Neural Networks with TensorFlow.js](https://learn-javascript.org/tensorflow-cnns/): Master computer vision with CNNs using TensorFlow.js. - [TensorFlow.js Transfer Learning Tutorial](https://learn-javascript.org/tensorflow-transfer-learning/): Transfer learning allows you to take a pre-trained model and adapt it for your specific use case with minimal training data. - [Brain.js](https://learn-javascript.org/brain-js/): Brain.js is a GPU accelerated JavaScript library for Neural Networks. - [GPU Acceleration with Brain.js](https://learn-javascript.org/brain-js-gpu/): Learn how to leverage GPU power for faster neural network training and inference using Brain.js GPU acceleration features. - [Recurrent Neural Networks with Brain.js](https://learn-javascript.org/brain-js-rnns/): Master sequence learning with RNNs and LSTMs using Brain.js. Perfect for text generation, time series prediction, and sequential data analysis. - [ml5.js](https://learn-javascript.org/ml5-js/): ml5.js is a friendly JavaScript library for the browser that makes machine learning accessible to artists and creative coders. - [ml5.js + Teachable Machine Integration](https://learn-javascript.org/ml5-teachable-machine/): Learn how to create custom machine learning models with Google's Teachable Machine and integrate them seamlessly with ml5.js for powerful web applications. - [Creative Coding with ml5.js + p5.js](https://learn-javascript.org/ml5-creative-coding/): Explore the intersection of machine learning and creative coding. - [Creative Coding with ml5.js + p5.js](https://learn-javascript.org/ml5-creative-coding-p5/): Explore the intersection of machine learning and creative coding. ## AI-Native Configuring agents, harnesses and feedback loops for this language. Updated as the tooling moves. - [Setting up a coding agent for a JavaScript project](https://learn-javascript.org/ai/agent-setup/): Node projects have the loosest defaults of any ecosystem here, which means the setup work matters more. - [Writing an AGENTS.md for JavaScript](https://learn-javascript.org/ai/agents-md/): JavaScript needs a longer instructions file than the typed languages, and most of the extra length should be one list: what the platform now does that a package used to. - [Testing JavaScript that calls a language model](https://learn-javascript.org/ai/evals/): Your function is now non-deterministic, slow, costs money per call, and streams. Here is a test strategy that still works — including for the streaming part, which is where most of the real bugs are. - [Tracking and cutting token costs in Node](https://learn-javascript.org/ai/tokenomics/): Node's specific cost problem is streaming: the user leaves, the stream keeps running, and you keep paying. That plus three other changes usually halves the bill. ## Review & Verify How generated code fails in this language, and the checks that catch it before your users do. - [The JavaScript mistakes language models actually make](https://learn-javascript.org/review/failure-modes/): Async is where most of it lives. The rest is stale idioms from a decade of training data written before the language got good. - [npm dependency hygiene: install scripts, slopsquatting and transitive bloat](https://learn-javascript.org/review/dependencies/): npm is the largest supply-chain surface in software, and the only major ecosystem where installing a package runs arbitrary code before you have written a line. - [Security review checklist for AI-generated JavaScript](https://learn-javascript.org/review/security/): No compiler, a dynamic object model and the largest dependency ecosystem in software. The vulnerabilities that recur in generated JS follow from all three. - [The performance traps in generated JavaScript](https://learn-javascript.org/review/performance/): Node is single-threaded, so a performance bug is an availability bug. Every item here is really the same item: something blocked the event loop or ran unbounded. ## Reference pages - [About Learn JavaScript, and how we make money](https://learn-javascript.org/about/): Editorial policy, sourcing, corrections and affiliate disclosure for Learn JavaScript, part of the Code Learning Dojo network. - [The JavaScript stack we would set up today](https://learn-javascript.org/tools/): An opinionated JavaScript toolchain for 2026: runtime, package manager, linting, testing, and the dependencies you no longer need.