A program using prompts in javascript