Solution 3 - tested with Jasmine

A Pen by BretCameron