Unicorn Alley

Unicorn Alley

Thousands of years ago, unicorns roamed the forests on all continents. In modern times, however, they've been driven from their verdant woodlands, taking refuge in an unfamiliar territory: New York City. Forced to adapt, they've gained new skills and abilities. This is their story..

Your task is to help these unicorns by adapting their old, functional Javascript ways to a new, shiny, object-oriented methodology.

Unicorns have the following functions:

  • attack
  • defend
  • heal
  • breakdance
  • eatCronut

Choose one person to clone down this repo and then open up the index.html file provided. Take a look at the func-index.js file and discuss how it works. As a table, take the functions provided in func-index.js and convert them to an object-oriented alternative in the oo-index.js file. When complete, in your html file, switch from func-index.js to oo-index.js in the script tags to see if you were successful in your task.