โ† Ages 8โ€“10/Even or Odd Stripes
๐Ÿ“– Story

Even or Odd Stripes

A car drives through the paint shop again and again. On even trips it comes out red, on odd trips blue. The trick is the remainder operator %.

What you'll learn

Use % and if / else inside a loop.

New command

if (i % 2 === 0)
๐Ÿ’ป Code Editorjs
๐ŸŽฌ

Press Run Code to see your creation!

โฎ Previous lesson