Getting input from users in JavaScript
prompt( ) β The browser provides a built-in function that can be used to get inputfrom the user, named prompt. The prompt( ) method displays a dialog box that promptsthe visitor for input. Once the prompt function obtains input from the user, it returns that input. Syntax: – prompt(text, defaultText) Ex:- prompt(βEnter Your Name: β, … Read more