Pop-Up Boxes
*This is an extracurricular lesson, with notes from my brief couple weeks using the SoloLearn app mixed in*
alert() - takes a single parameter and displays it inside the box; use /n for line breaks; user can only access the page after clicking OK
prompt() - the user can either press OK or Cancel; This takes two parameters: whatever you want inside the box and a default string(optional)
Example: var user = prompt(”name”); alert(user);
Must have the alert thing
confirm()- user can click OK or cancel; OK returns true and Cancel returns false; Can use an if-else statement to add text
Example: var result = confirm(”Wanna leave?”); alert(result);
Must have the alert thing















