in javascript window.prompt only for string code example Example: js prompt var answer = prompt('What is your name?','Joe Blogg');