Please enable JavaScript to use CodeHS

Chapter 1

Basic JavaScript and Graphics

1.3 Variables

What Are Variables?

Declaring vs. Initializing

Using Variables

Types of Variables

Variable Type Examples

Naming Variables

Keywords

Check Your Understanding

  1. Incorrect Correct No Answer was selected Invalid Answer

Exercise: Daily Activities

Vocabulary

Term Definition
Boolean A boolean is a true or false value.
Declare a Variable Declaring a variable is defining it for the first time.
Variable A symbol or container that holds a value.
Integer A whole number (not a fraction)
String A sequence of characters
Initialize a Variable Initializing a variable is giving it an initial value.
Float A float, or floating point value, is a numeric value that can have decimal level precision (ex: 3.14)