Recreation of my favorite text-based clock using JavaScript