JavaScript for Kids
Part 1: Getting Started (Pages 1–10) Page 1 – What is Programming? Programming is like telling
a robot what to do step by step. Imagine telling a robot to brush teeth: 1. Pick toothbrush 2. Put
toothpaste 3. Brush teeth 4. Rinse mouth That’s how programming works!
Page 2 – What is JavaScript? JavaScript is the language of the web. It makes websites come alive
with buttons, animations, and games.
Page 3 – Tools to Write JS You don’t need a special program – just your web browser! Open
Chrome → Press F12 → Go to Console → Type JavaScript.
Page 4 – First Program
console.log("Hello, World!");
This prints a message to the console. Exercise: Change the text to your name.
Page 5 – Comments in JS
// This is a single line comment
/*
This is
a multi-line comment
*/
Exercise: Add your name in a comment.
Page 6 – Variables with let
let age = 10;
console.log("I am " + age + " years old");
Page 7 – Constants with const
const pi = 3.14;
console.log("Pi is " + pi);
Page 8 – Data Types Numbers, Strings, Booleans:
let score = 95;
let name = "Alice";
let isHappy = true;
console.log(score, name, isHappy);
Page 9 – Simple Math
let a = 5, b = 2;
console.log(a + b);
console.log(a - b);
console.log(a * b);
console.log(a / b);
Page 10 – String Tricks
let word = "Hello";
console.log(word.length);
console.log(word.toUpperCase());
console.log(word + " World");