Summary: Programming Basics
Review what we learned about programming basics in JavaScript.
We'll cover the following
Key points
-
Comments are ignored by the program, but make our program easier to read and understand.
-
Primitive types are the basic building blocks of a program.
-
Primitive types in JavaScript include strings, numbers and Booleans.
-
Composite data types are structured collections of primitive data types.
-
Composite data types in JavaScript include arrays and objects.
-
Variables point to values stored in memory and are declared using the
const
,let
orvar
keywords. -
Values are assigned to variables using the
=
operator. -
The value of any variables declared using
const
can’t be changed. -
We can reassign values to variables that have been declared already using
let
orvar
. -
Alert, prompt and confirm boxes can be used to add some interaction between a web page and the user.
In the next chapter, we’ll be looking more closely at how strings are used to display letters and words. But first, we have a quiz and a challenge!
Get hands-on with 1400+ tech skills courses.