JS homework

This is part of my homework which I did during the training at the
Maxymiser Academy.