WDV221 Intro Javascript

Unit-3 - Functions


Please complete the following exercises on this page. When complete post this page to your server. Make a link in your WDV221 homework page for this assignment.

Submit this assignment on Blackboard. Please include a link to your homework page.


Use Javascript to complete the following tasks.

  1. Create a global variable and assign it with a string of your name
  2. Create a function called sayHello( ). The function will use the alert( ) function to display your name. Call it during runtime.
  3. Create a function called printHello( ). The function will use the document.write( ) function to display your name. Call it twice in a row during runtime.
  4. Call the printHello( ) function so that it prints your name inside of an h1 element.
  5. Create a function called characterCount( ).