Solution: completed JavaScript code | Coder Vox