3.02 · Lab
Types & Operators
Math, gluing, and comparing — three jobs, and + picks between the first
two based on what's sitting either side of it. Read the thermostat
carefully.
Exercise
Read a thermostat
Checks itself — try as often as you likeIn the script pane:
- Declare
let temperatureset to68. - Declare
let doubledset totemperature * 2. - Declare
let unitset to the string"F". - Declare
let readingset totemperature + " " + unit(so it reads"68 F"). - Declare
let isWarmset to whethertemperatureis greater than65.