Homework 4: Loops and Conditionals

Esther Barnett
Feb 11, 2021

--

My codepen:

I incorporated:

→ A circle grid with nested loops

→ mouseX and mouseY to paint a smiley onto the canvas in various locations

→ created a button that changes its background color when the mouse hovers over it

→ used mouseIsPressed to change both the colors of the grid circles and make the smiley face appear each time the mouse is pressed

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Esther Barnett
Esther Barnett

No responses yet

Write a response