WDV221 Intro Javascript

Unit-2 - Variables Assignment


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.

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

For each exercise use a comment line to put the Exercise number within the script. Also place a short description of what the script is doing.


1. Define a String variable called schoolName and assign it a value of DMACC. Use the keyword const for this variable. Use document.write() to display the value of the variable within an h2 element.

2. Define a String variable called courseName and assign it a value of WDV221 Intro Javascript. Use document.write() to display the value of the variable within the following paragraph.

Hello! Welcome to .

3. Define a Numeric variable called testScore and assign it a value of 100.00. Use console.log() to display the value of the variable.

4. Define a Numeric variable called courseGrade. Do not give it a value. Use console.log() to display the value of the variable.

5. Define a Boolean variable called courseCompleted. Give it a value of false. Use an alert() to display the value of the variable.