Here, I have implemented a memory game with ES5. Three functions have been created such as GameController, UIController and Controller. The GameController, UIController and Controller represents to Model, View and Controller, respectively. The implemented memory game is accessible at here, you enter 2, 4 or 6 in the input box…