Lesson 1

Introduction to JavaScript

Using console.log()

Write a short story about yourself


Draw shape using console.log()

        * * *
       ** * **
      *** * ***
     **** * ****
    ***** * *****
   ****** * ******
  ******* * *******
 ******** * ********
********* * *********


Find bugs and fix it


Pop-Up Hello

Change it to greet themselves — e.g. alert("Hello, Maya!"). Click OK and watch it disappear.

alert("Hello, World!");

Multiple Pop-Ups

Write 3 alerts, run it, and notice that you need to click OK each time before the next one shows up — that's the code "waiting" for them.

alert("Welcome to JavaScript!");
alert("This is pop-up number 2.");
alert("And this is the last one!");

Alert + Variable

Combine alert() with a variable. Change name to your name and run it.

let name = "Maya";
alert("Hello, " + name + "! Welcome to code club.");

Secret Message Reveal

Customize the countdown and final message with your own secret reveal

alert("Are you ready for a secret?");
alert("Okay here it comes...");
alert("3...");
alert("2...");
alert("1...");
alert("🎉 You are a JavaScript coder now! 🎉");