JS MVC design pattern quiz


Adaptable quiz in JavaScript


February 2016

tools used

HTML, SCSS & jQuery


Using the MVC design pattern to separate concerns within the code. For example keeping quiz questions within the questionData module. UI interaction within a UIController module, and accesing both using a controller module. This is my first attempt using MVC and i am beginning to see the pros, especially for data that would need to be kept private, the mvc pattern offers a way of deciding whether you would like certain code to be private or public. It makes use of object literals and creates an easy way to access code. An awesome post explains this in technical detail here.


MVC pattern basics. Multi dimensional arrays. For loop to check radio checked. css progression bar. Accessing arrays. Ipdating the dom. Calling functions.

See the Pen Module pattern quiz by Harry Beckwith (@fun) on CodePen.

← Back to all projects