Coding Basics
Coding is not just a skill for developers. It is a basic literacy that lets you hand repetitive work to a computer and check whether code an AI wrote for you is actually right. You learn by running code yourself in the browser, with nothing to install.
Today you can describe what you want to an AI coding assistant and get code back in seconds. But whether that code really does what you wanted, whether it breaks on empty data or edge values, and whether it handles passwords or personal information carelessly are things you can only judge if you can read code. And chores like tidying a spreadsheet every month, fixing the format of text, or repeating the same calculation can often be replaced by a few lines of code. This course is not about becoming a professional developer. It is about building the ability to automate repetitive work yourself and to verify code that AI produces.
The course runs in this order: a way of thinking (Lesson 1), the basic grammar for handling values and flow (Lessons 2–5: variables, conditionals, loops, functions), working with data and text (Lessons 6–7), reading and fixing errors (Lesson 8), turning real repetitive work into code (Lesson 9), and reading code written by AI and checking it for testing, security, licensing, and privacy issues (Lesson 10). Later lessons keep reusing what earlier ones teach, so taking them in order is recommended.
The language is JavaScript. Every web browser has a JavaScript engine built in, so you can start right away without installing anything. Each lesson has a code playground where you can edit and run the examples from the text, and fill in exercises and get them graded. Code in the playground runs only inside your own browser, in a safe space isolated from the page (a sandbox), and is never sent to a server.
- Anyone who wants to cut down on work they repeat by hand every time, like tidying spreadsheets or fixing text
- Anyone who wants to check code from an AI coding assistant before pasting it in as is
- Anyone learning to code for the first time, or who started before and gave up when the grammar got in the way
- Anyone who works with developers and wants to understand what code and error messages mean
Lessons
-
1LESSON
🧭 What Is a Program? — Breaking Work into Sequence, Choice, and Repetition
Programming is not about difficult formulas. It is about breaking what you want done into steps so small and clear that a computer cannot misunderstand them. Those steps are ultimately built from three things: sequence, choice, and repetition.
18 min -
2LESSON
📦 Values, Variables, and Types — Putting Name Tags on Values
A program is a chain of taking values, changing them, and handing them back. Values have kinds (types), and a variable is a name tag you attach to a value. Automatic conversion when you mix values of different kinds accounts for a large share of beginner mistakes.
20 min -
3LESSON
🔀 Conditionals — Taking Different Paths Depending on the Situation
Conditionals are how you write choice, the second ingredient of an algorithm, in code. Most of writing a condition correctly is deciding clearly which way to go right at the boundary.
20 min -
4LESSON
🔁 Loops — Doing the Same Thing Many Times, Exactly
A loop states two things together: what to repeat and when to stop. Learn the two patterns for building totals and counts, plus the habit of checking the stop condition, and you can turn most repetitive work into code.
20 min -
5LESSON
🧩 Functions — Splitting Work into Small Named Machines
A function is a named bundle of code that takes input, processes it and hands back a result. The result must be handed back with `return`, not printed with `console.log`, so other code can keep using it — and that is also what makes it easy to test.
22 min -
6LESSON
🗂️ Arrays and Objects — Storing and Handling Data
An array is an ordered list, and an object is a bundle where you find values by name (key). Put them together and an "array of objects" is just like a table: with loops and `map`, `filter` and `reduce` you can total it up and pick out the rows you want.
24 min -
7LESSON
🔤 Strings and Text — Cutting, Finding and Replacing Characters
A string is a value made of characters in a row, and JavaScript comes with built-in methods for cutting, finding, splitting and replacing. The key ideas are that methods never change the original string but return a new one, and that `length` is not always the same as the number of characters you see.
20 min -
8LESSON
🐞 Debugging and Reading Errors — Turning Red Text into Clues
An error message tells you what went wrong and where, through its 'name: description' and a line number. Read the message to the end, print values to check them, and rule out hypotheses one at a time, and most bugs are caught faster than you expect.
22 min -
9LESSON
⚙️ Simple Automation — Spreadsheet Math and Text Cleanup in Code
We combine values, conditions, loops, functions, arrays and strings into small automations you can actually use. You move hand-done tallying and cleanup into code, while building the habit of protecting the original and checking the results yourself.
22 min -
10LESSON
🔍 Reading and Verifying AI-Written Code — Tests, Security, Licenses, Privacy
AI-written code can look convincing yet fail on edge cases or be unsafe. Reading the code, checking it with tests you wrote yourself, and reviewing secrets, packages, licenses and personal data is the job of the person who uses it.
24 min