alert('Hello World'); document.write('My name is Gary'); prompt('What is your name');
You write programs by writing multiple statements just as you would write a book using sentences. This program is made of three statements. The Alert is a method that’s built into the browser object. It opens a dialogue box and displays a message. The document.write is another method that writes a message to the page and the prompt method opens a dialog box requesting information from the user.
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <link rel="stylesheet" href="css/main.css"> <title>Let's Make Something</title> </head> <body> <script src="random.js"></script> </body> </html>