Getting StartedGiving Commands to ObjectsPrograms 1Programs 2CalculatorVariables: Remembering StuffStrings 1Strings 2InputIfWhile: Loops and Repeating ThingsRandom Numbers and ChooseFSM: The Finite State Machine
Programs 2


Tvbot's TV can be turned on and off with the "on" and "off" commands. Give it a try.

Example of channel() command (with an on() first)

You can also change the channel on Tvbot's TV. You do this by giving Tvbot the "channel" command, and putting a channel number between the two brackets. Tvbot can be tuned to channels 0, 1, 2, 3, or 4.

Example of the clock.time() command and the response

Robots aren't the only objects in JavaScript. There are some objects that you can't even see. There is a clock object that can give you the time, but it doesn't show up on the screen. You can give the "time" and "date" commands to the clock to find out what time and day it is.

Example of a show command: show(3) with a window popping up

Sometimes you can give a command directly to the computer. In these cases, you don't need to type an object or the period. You just type the command only. One of these commands is "show." The show command will show a number on the screen. If you put a number in-between the brackets, that number will be shown on the screen.


Programming Basics

Programming Basics: Beginners

E-mail | About | Privacy Policy