A quick example of number flipping in JavaScript