-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathQ23.js
More file actions
74 lines (63 loc) · 1.93 KB
/
Copy pathQ23.js
File metadata and controls
74 lines (63 loc) · 1.93 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/* *****************************************************
*
* File Description: Problem 23
* panacloud-modern-global-apps/typescript-node-projects
*
* 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.
*
* created by: abkh
* modified on: 5 October 2022
*
*/
/* 5 Tests Evaluating to TRUE */
// TEST 1
let car = 'subaru';
console.log("Is car == 'subaru'? I predict True.");
console.log(car == 'subaru')
// TEST 2
car = 'honda';
console.log("Is car == 'honda'? I predict True.");
console.log(car == 'honda');
// TEST 3
car = 'toyota';
console.log("Is car == 'toyota'? I predict True.")
console.log(car == 'toyota')
// TEST 4
car = 'mazda';
console.log("Is car == 'mazda'? I predict True.")
console.log(car == 'mazda')
// TEST 5
car = 'tesla';
console.log("Is car == 'tesla'? I predict True.")
console.log(car == 'tesla')
console.log("");
/* 5 Tests Evaluating to FALSE*/
// TEST 6
car = 'BMW';
console.log("Is car == 'subaru'? I predict False.")
console.log(car == 'subaru')
// TEST 7
car = 'Mercedeze';
console.log("Is car == 'BMW'? I predict False.")
console.log(car == 'BMW')
// TEST 8
car = 'Suzuki';
console.log("Is car == 'honda'? I predict False.")
console.log(car == 'honda')
// TEST 9
car = 'toyota';
console.log("Is car == 'mazda'? I predict False.")
console.log(car == 'mazda')
// TEST 10
car = 'tesla';
console.log("Is car == 'volvo'? I predict False.")
console.log(car == 'volvo')