Message Box
Message Box
Lets give the user a bit more information about what's going on with a message box.

Challenge
Create a new renderMessage method and call it whenever a ship leaves a port, docks at another or reaches the end of its itinerary.
To complete this challenge, you will need to:
- Add a CSS ruleset for selector
#messageand add CSS rules to style your message box. - Create a new
renderMessagemethod on theController.prototypethat accepts a parameter ofmessage. - Inside the
renderMessagemethod, append a newdivelement to the#viewportcontainer (usingElement.appendChild) with anidof'message'and set itsinnerHTMLof themessagevariable. - Add a
setTimeoutwhich will remove the#messagediv element from the DOM (usingElement.removeChild) after 2 seconds. - Call the method when the ship sets sail.
- Call the method when the ship docks.
- Call the method when the ship attempts to go further than its itinerary (in place of the
alert).