0% found this document useful (0 votes)
78 views1 page

JavaScript For Kids

The document introduces programming and JavaScript, explaining that programming involves giving step-by-step instructions to a computer. It covers the basics of writing JavaScript in a web browser, including creating a simple program, using comments, and understanding variables, constants, data types, and basic math operations. Additionally, it provides exercises to reinforce learning, such as modifying code and exploring string functions.

Uploaded by

Maria lisa moore
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
78 views1 page

JavaScript For Kids

The document introduces programming and JavaScript, explaining that programming involves giving step-by-step instructions to a computer. It covers the basics of writing JavaScript in a web browser, including creating a simple program, using comments, and understanding variables, constants, data types, and basic math operations. Additionally, it provides exercises to reinforce learning, such as modifying code and exploring string functions.

Uploaded by

Maria lisa moore
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

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");

You might also like