Skip to content

Videos

JavaScript

Pick a topic to watch.

15 video lessons

2:37 Lesson 1 console.log and comments JavaScript is the language your browser already speaks. It runs inside the page you are looking at — no installing, no setting up, it is simply there. And the… 2:20 Lesson 2 Variables — let and const A variable is a box with a name on it. This line makes a box called city and puts the word Cairo into the box. Notice the word at the front — const — which is… 2:08 Lesson 3 Numbers and maths JavaScript does arithmetic without being taught. Plus and minus and star add, subtract, multiply — and the answers come straight back in the console. Then look… 2:32 Lesson 4 Strings A string is text in quotes, and a plus between two strings joins them — concatenation, if you want the proper word. Here the greeting is built from three… 2:22 Lesson 5 Template literals You already know how to build a sentence out of pieces: joining with pluses. It works, and it gets ugly fast — four fragments, two pluses, quotes opening and… 2:28 Lesson 6 Booleans and comparisons So far your values have been numbers and strings. Here is a third kind, and it has only two values in the whole world: true and false. It is called a boolean… 2:21 Lesson 7 if / else An if in JavaScript has a shape you copy exactly. The word if, then round brackets holding the test — the boolean you learned to write last lesson. Then curly… 2:33 Lesson 8 for loops A JavaScript for loop packs three separate jobs into one set of brackets, separated by two semicolons. The first part sets the counter up, and it runs once… 2:26 Lesson 9 while loops A for loop is right when the number of passes is written down in the loop itself — one to five is five passes, and you can see it. But now suppose you start at… 2:19 Lesson 10 Functions A function is a job with a name. You write the word function, which tells JavaScript you are defining something rather than running it — nothing in the body… 1:57 Lesson 11 Arrow functions Start with the function you already know how to write. First, give the function a name by storing it in a const, instead of naming it after the word function.… 2:22 Lesson 12 Arrays An array holds several values in order, under one name, written in square brackets. Each item sits at a numbered position, counting from zero — the same… 2:14 Lesson 13 Array methods Doubling every number in an array is something you can already do: make an empty array, write the loop yourself, push each doubled value. Four lines, an index… 2:17 Lesson 14 Objects An array holds a list of similar things. An object holds different facts about ONE thing. You could keep a book's title and page count in two separate… 2:04 Lesson 15 Putting it together One more loop before the end, and it is the one you will reach for most. The version you know needs a counter and an index — three things to write, and an…

Log in or create account

IGCSE, A-Level & AP