In the JS example, we break each step with asking the user to hit enter to proceed. The Java example returns all steps in one go.