The first thing to know is that Javascript draws a distinction between numbers and text (aka strings). It also has another thing called booleans.
Examples | ||
---|---|---|
Numbers | Strings | Booleans |
123 | "hello" | true |
0 | "I like bananas" | false |
-73.2 | "I'm hungry" | |
0.017 | 'watermelon' | |
90000 | ":)" |
Numbers are pretty straightforward.
Strings are pieces of text enclosed in single or double quotes. They can contain anything except the type of quote used to introduce them, and they can't extend over more than one line.
(Like many things in S2JS, this is a bit of an over-simplification, but it lets us progress without getting too bogged-down in detail)
|