Skip to content

Putting it together

Putting it together

  • Real programs combine variables, loops, functions, arrays and objects.
  • A for...of loop reads each item of an array directly — no index needed.

The loop reads 4, 8 and 6 in turn; t grows 4, 12, 18 and total returns 18

Handout

Log in or create account

IGCSE, A-Level & AP