Sea
Sea
We're going to use JavaScript to change the background of our viewport every second so our water moves.
To do this we are going to create a Controller constructor/prototype, which is responsible for interacting with and updating the DOM based on the state of our application.

Challenge
Use a combination of setInterval with a duration of 1000 (1000 milliseconds = 1 second) and document.querySelector to manipulate the viewport background.
You may need the walkthrough for this step as there are many concepts to cover.
To complete this challenge, you will need to:
- Create a new constructor function called Controllerinsrc/controller.js.
- Create a new prototype method for ControllercalledinitialiseSea, and call it from within the constructor.
- Import the controller.jsfile into your html using ascripttag at the end of thebody.
- Add another scripttag underneathm but this time use inline JavaScript to create a new instance ofController.
- Inside your initialiseSeamethod, usesetIntervalto run a callback function every1000milliseconds. Inside the callback function usedocument.querySelectorto find the#viewportelement and change the background image so it alternates betweenwater0.pngandwater1.png. You'll probably want to keep some sort of "counter" variable outside of yoursetIntervalto determine which background image to use.