From zero to your first real programs, with a friendly checker that catches mistakes before your code runs.
- 28 lessons
- 7 units
- 3 h 31 m in all
- £0, for good
what’s inside.
For people who have never written a line of code. Nothing is assumed: every new word is explained the moment it appears.
TypeScript Level 1 assumes nothing, not even JavaScript. In 28 short lessons you go from what code is to writing your own typed functions, with a guess, a hands-on task and a fix-the-bug challenge in every lesson. It ends with a level check: a tiny quiz game that reads real answers.
every lesson goes the same way.
- meet it
- guess first
- your turn
- fix it
- nailed it
unit 1
Say hello
Make the computer do exactly what you tell it.
- What code really is5 minFind out what code is and run your very first program.
- Your first line6 minMake the computer show any message you like.
- Showing more than once7 minShow several lines, blank lines and lots of words at once.
- When it goes wrong8 minRead error messages and fix the ones you will see most.
unit 2
Boxes with names
Make the computer remember things.
- A variable is a labelled box8 minStore a value in a box, label what kind it is and get it back.
- Boxes can change7 minSwap what is in a box, lock a box and join strings.
- Good names, bad names6 minChoose names that TypeScript accepts and people understand.
- Asking a question8 minAsk the person a question and use their answer, even if there is none.
unit 3
Words and numbers
Tell text and numbers apart and use both.
- Text vs numbers7 minSpot the difference between a string and a number.
- Doing maths7 minAdd, take away, multiply and divide like a pocket calculator.
- Tricks with text8 minShout, whisper, tidy and measure your strings.
- Putting values inside text9 minDrop values into sentences and turn typed text into numbers.
unit 4
Make decisions
Make your program choose what to do.
unit 5
Repeat yourself
Do the same thing many times without copying.
- Counting with for8 minRepeat lines as many times as you like with a for loop.
- Repeating with while8 minKeep a loop going until its condition turns false.
- Loops that decide8 minCheck every number in a loop and act on the ones that match.
- Stopping early7 minJump out of a loop, or skip a turn, when you need to.
unit 6
Arrays
Keep many things together and work through them.
- Making an array7 minKeep lots of values together in one labelled box.
- Reading and changing items8 minPick out, swap and add items by their place in an array.
- Looping over an array8 minVisit every item in an array and add them all up.
- Searching an array8 minFind out whether something is there, where it is, and which is biggest.
unit 7
Your own commands
Wrap code up so you can use it again.
- Making a function7 minWrap lines of code under one name and run them whenever you like.
- Giving it information8 minHand your function a value so it can do something new each time.
- Getting an answer back8 minMake a function hand you a result you can keep and use.
- Putting it all together9 minBuild a small program from functions, arrays, loops and decisions.