Skip to content

Instantly share code, notes, and snippets.

@galElmalah
Created May 26, 2020 13:03
Show Gist options
  • Save galElmalah/77c2cecf46a4161baca35af32076808a to your computer and use it in GitHub Desktop.
Save galElmalah/77c2cecf46a4161baca35af32076808a to your computer and use it in GitHub Desktop.
drawing all of the members to the canvas
const randomArray = shuffledArrayInRange();
const arrayMembers = randomArray.map((v, i) => {
return new ArrayMember(10 * i + i, 0, 10, v * 5);
});
const drawAll = () => arrayMembers.forEach((m) => m.draw());
drawAll()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment