JavaScript homework from Software University course!