Your task is to create a Froyo machine! Go through these steps, and do as many as you can in the time we have:
index.html
, we have given you a power button and 3 flavor buttons on the machine. When a user presses the power button, the 'click'
event will fire for that element. We have started writing an event listener for you. Find the anonymous function callback for the event listener.isOn
to true
inside of the same callback.img/chocolate.jpg
, img/vanilla.jpg
, and img/swirl.jpg
to create an <img>
tag, add a src
attribute, and append it to the conveyor belt <div>
on the side of the machine.index.html
in your browser and make sure you can turn the button on. Make sure that your images get appended to the conveyor belt.isOn
is changing to accurately reflect the state of the machine.Make sure that you use your browser developer tools to make debugging easier while working on this. Check for errors using console.log()
to figure out how far your code makes it and what the values of your variables are along the way.