Learning Plan 3 : Math and Operators
Part 1
- Open this file in your browser and Microsoft Visual Studio
- Add your name, section, and email
- Add code after the line:
// PART 1: YOUR CODE STARTS AFTER THIS LINE: to complete the exercise.
- Pick a number, any old one will do.
- In a set of
document.write(); statements compare the number with the same number with all of the relationship operators.
- Display each comparison as shown in the sample output.
Sample Part 2 Output:
(10 < 10) is false
...
Your Part 1 Output:
Part 2
- Add code after the line:
// PART 1: YOUR CODE STARTS AFTER THIS LINE: to complete the exercise.
- Here we're going to compare a number with its string version. An example would be the number
10 compared to the string "10".
- Just like in part 1, use all the relationship operators in a set of
document.write() statements.
- Is there any difference between the output of the two parts?
Sample Part 2 Output:
(10 < "10") is false
Your Part 2 Output: