Overview
Learn JavaScript by writing and debugging your first programs. You'll store and calculate with values, convert text and numbers, and combine comparisons into conditions. Then you'll use if statements and counting loops to make decisions, repeat work, and build a running total.
Syllabus
- Course 1: Writing and Running Your First JavaScript Programs
- Course 2: Storing and Calculating with JavaScript Values
- Course 3: Comparing and Converting JavaScript Values
- Course 4: Making Decisions and Repeating Work in JavaScript
Courses
-
Every program begins with getting a computer to do something you can see. You'll write and run real JavaScript inside the editor, display messages on screen, annotate your work with comments so it stays readable, learn to read an error message and repair the line it points at, and finish by storing your first value under a name you choose.
-
Programs get useful once they can change what they remember and work out new values. Here you'll reassign a stored value with let, calculate with arithmetic and parentheses, join text together to build a sentence, and finish by adopting template literals as the clean way to drop stored values straight into a message.
-
Values come in different kinds, and programs go wrong when the kinds get mixed up by accident. Here you'll check what kind of value you are holding, convert deliberately between text and numbers, compare two values to get a true-or-false answer, and combine several of those answers into one condition.
-
Real programs choose what to do and repeat work instead of running the same short list of steps every time. Here you'll run code only when a condition holds, pick between two paths and then between many, repeat a block a fixed number of times with a counting loop, and build up a running total as the loop goes round.