completed first exercise in js