-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathQ23.ts
47 lines (37 loc) · 1.54 KB
/
Q23.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/* Conditional Tests: Write a series of conditional tests. Print a statement describing each test and your
prediction for the results of each test. Your code should look something like this:
let car = 'subaru';
console.log("Is car == 'subaru'? I predict True.")
console.log(car == 'subaru')
• Look closely at your results, and make sure you understand why each line evaluates to True or False.
• Create at least 10 tests. Have at least 5 tests evaluate to True and another 5 tests evaluate to False. */
let car = 'subaru';
console.log("Is car == 'subaru'? I predict True.")
console.log(car == 'subaru') //True
let car3 = 'BMW';
console.log("Is car3 == 'BMW'? I predict False.")
console.log(car3 == 'BMW') //True
let car1 = 'honda';
console.log("Is car1 != 'honda'? I predict True.")
console.log(car1 != 'honda') //False
let car2 = 'Toyota';
console.log("Is car2 != 'Toyota'? I predict False.")
console.log(car1 != 'Toyota') //True
let car4 = 'BMW';
console.log("Is car4 === 'BMW'? I predict True.")
console.log(car4 === 'BMW') //True
let car5 = 'Audi';
console.log("Is car5 === 'Audi'? I predict False.")
console.log(car5 === 'Audi') //True
let car6 = 'Oval';
console.log("Is car6 !== 'Oval'? I predict True.")
console.log(car6 !== 'Oval') //False
let car7 = 'Mira';
console.log("Is car7 !== 'Mira'? I predict False.")
console.log(car7 !== 'Mira') //False
let car8 = 'ford';
console.log("Is car8 < 'ford'? I predict False.")
console.log(car8 < 'ford') //False
let car9 = 'foxy';
console.log("Is car9 < 'foxy'? I predict True.")
console.log(car9 < 'foxy') //False