WDV221 Intro JavaScript

Unit-3 Introduction to JavaScript functions

Tasks:

1. Run the displayGreeting( ) as a run time script.

2. Run the getStudentName( ) as a run time script.

3. Write a function called getStudentEmail( ). The function should use the prompt( ) to ask the user to enter their DMACC Email address. Store the returned valued in the global studentEmail variable that has already been defined.

4. Run the getStudentEmail( ) as a run time script.

5. Write a function called displayEmail( ). The function will display the global studentEmail variable with a message "Student Email:" in an alert. The button below will call the function when clicked.

6. Write a function called printStudentInfo( ). The function should write the studentName and studentEmail to the web page. Each in their own paragraph.

7. Fix the button element that will run the displayEmailServer( ) with a click event handler.