Question: Javascript Assignment. Complete the instructions inside the code below, complete each task, read carefully. Make sure everything is correct and working as it should. Javascript

Javascript Assignment. Complete the instructions inside the code below, complete each task, read carefully.

Make sure everything is correct and working as it should.

Javascript Assignment

Intro Javascript

Variables Assignment


Please complete the following exercises on this 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 variable call schoolName. Display the variable in the console. *Review the value of a variable that has been defined but has not been assigned a value.

2. Assign "UNIVERSITY" to schoolName. Display the variable in the console. *The quotes make this a String data type.

3. Assignment 12 to schoolName. Display the variable in the console. *This changes the datatype of the variable from a String to a number. Notice that a JavaScript variable changes datatype based upon it contents.

4. Define a variable called courseName and assign it a value of Intro Javascript. Use document.write() to display the value of the variable within the following paragraph instead of courseName shown below.

Hello! Welcome to courseName.

5. Define a variable called testScore and assign it a value of 100.00. Use console.log() to display the value of the variable. *Notice how JavaScript treats the .00.

6. Define a variable called courseGrade. Assign it a value of 88.65. Use console.log( ) to display the value of the variable. *Notice how JavaScript treats this number.

7. Define a variable called courseCompleted. Give it a value of false. Use console.log( ) to display the value of the variable. *Notice this is NOT a String datatype. true and false are reserved word within Javascript.

8. Assign a value of "false" to courseCompleted. Make sure and use the "" to make this a String datatype. Use console.log( ) to display the value of the variable. *Notice the difference between 7 and 8.

9. Create a variable called stringType. Assign it a value that makes the variable String data type. Use console.log( ) to display the variable stringType

10. Create a variable called numberType. Assign it a value that makes the variable a number data type. Use console.log( ) to display the variable numberType.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!