A JS implementation of the cookies and ovens exercises