The dude's life

The Dude says that life is "Strikes and gutters, man." Write an app that tells the Dude what his life is currently like.

It starts like this:

Start

Click a button to add a strike, or a gutter. The numbers change, and the app summarizes the Dude's life. For example:

Life status

If strikes and gutters are within three of each other (e.g., strikes is 5, and gutters is 7), then the message should be "Life is OK, man."

If there are at least four more strikes than gutters, the message should be, "Life is cool, man."

If there are at least four more gutters than strikes, the message should be, "Life sucks, man. But the Dude abides."

Note: put all of the code that changes the HTML in one function, called LifeStatus.updateLife(). Call it as appropriate.

Upload the URL of your solution.

(If you were logged in as a student, you could submit an exercise solution, and get some feedback.)

Referenced in: