We'll be at CSTA 2025 in Cleveland July 7-11th. Come say “Hi” 👋
Kid.js logo
Activities For Rookies For Educators
Log In Sign Up Activities For Rookies For Educators Log In Sign Up

For Rookies

Computers are just machines and they need to be told what to do. Coding is simply telling the computer what to do.

Just like there are many human languages, there are many programming languages. We will be learning JavaScript, which is a great language for beginners. It was originally designed for web browsers, but today is used all over the place, in games, app, servers, and even in space.

Functions

Most computer programs are made up of commands, called functions. To run a function in JavaScript, type its name followed by parentheses.

For example, if you want to hear a trumpet sound, you can try this command:

tada()

Make sure your sound is on and hit the play button!

Parameters

Sometimes, functions need extra information called parameters. Imagine telling someone to walk. You would also need to say how many steps or which direction to go. These are parameters. Parameters go inside the parentheses.

The speak() function tells the browser to say something, but we need to tell it what to say. Try changing the text inside of the quotes. Remember, the computer has to do whatever you tell it to!

speak("Hello")

Coordinates

If you were to hold a magnifying glass up to your computer screen, you would see it is made up of tiny little dots called pixels. When drawing on the screen, we use coordinates to tell the computer where to draw. We count pixels from the left edge—the x coordinate—and from the top edge—the y coordinate.

For example, the star() function draws a star on the screen, but we need to say where to draw the star, and how big to make it.

star(400, 200, 250)

Try changing the numbers and watch the star move and change size.

You’re doing great! Ready for more?

Create an account and start building your own apps.
Experiment with different shape functions or follow one of our fun activities!

Get Started

Activities

All Asteroids Simulating Dominos Plinko

Support

Framework Reference GitHub Repository Discord Community Contact Us

Legal

Terms of Use Privacy Policy
© 2020-2025 Maissan Inc. All rights reserved.