The Associative Array

I wasn't planning to talk about associative arrays despite the fact that they are the main structure underlying all of JavaScript. Also we've come all this way without needing them. But then I decided to work on the Four Turtles Puzzle where, of course, we need four turtles!


We'll re-use your files so far so replace the index.html body with:

  <body onResize='resize();'>
    <canvas id='c'></canvas>
    <script>setup();</script>
  </body>

Delete the two picture files and replace what's in styles.css with:

body {
  display:flex;
  justify-content: center;
  background-color: rosybrown;
}
#c {
  margin-top:.5vmin;
  border: 1vmin groove gold;
}