Plain vanilla javascript code that was create when I was revising my knowledge about the language