E-Learning Platform
0 of 139 builtAlways freeSign in
3.05 · Lab

Arrays & Loops

A list, a counter, and a stopping point one slot earlier than you'd expect. Count carefully on this one.

Exercise

Total up a power strip

Checks itself — try as often as you like

In the script pane:

  • Declare let numbers set to the array [4, 8, 15, 16].
  • Using a for loop, add up every number in numbers into a variable called total.