Create a popup with some text
alert("hello");
Give users some information
alert("you win!");
alert("you lose!");
Add some numbers together and show the result
alert(2 + 2);
Add some words together
alert("hello " + "everyone!");
Save the sentence as a variable and display its value
var hello = "hello world";
alert(hello);
prompt("Enter a secret word");
Display the popup again and save the answer as a variable
var answer = prompt("Guess a letter");
alert(answer);