Create decorator.js

Bonus assignment 4.2 decorator function.