-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathq22.ts
52 lines (46 loc) · 1.98 KB
/
q22.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
48
49
50
51
52
//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.
// test1
let car:string = 'subaru';
console.log("Is car == 'subaru'? I predict True.");
console.log(car == 'subaru');
//test2
let country:string = 'Pakistan';
console.log("Is country == 'Pakistan'? I predict True.");
console.log(country == 'Pakistan');
//test3
let secondCountry:string = 'Canada';
console.log("Is second country == 'Canada'? I predict True.");
console.log(secondCountry == 'Canada');
//test4
let cricketTeam:string = 'Pakistan';
console.log("Is favourite cricket team == 'Pakistan'? I predict True.");
console.log(cricketTeam == 'Pakistan');
//test5
let footballTeam:string = 'Saudi Arabia';
console.log("Is favourite football team == 'Saudi Arabia'? I predict True.");
console.log(footballTeam == 'Saudi Arabia');
//test6
let brand:string = 'Edenrobe';
console.log("Is favourite clothing team == 'Outbreak'? I predict True.");
console.log(brand == 'Outbreak');
//test7
let foodBrand:string = 'Pizza Hut';
console.log("Is favourite fooding brand == 'Subways'? I predict True.");
console.log(foodBrand == 'Subways');
//test8
let favRestaurant:string = 'Bar B Que Tonight';
console.log("Is favourite restaurant == 'Almaida'? I predict True.");
console.log(favRestaurant == 'Almaida');
//test9
let favPlace:string = 'Naran Kagaan';
console.log("Is favourite place == 'Gawadar beach'? I predict True.");
console.log(favPlace == 'Gawadar beach');
//test10
let favSports:string = 'cricket';
console.log("Is favourite sports == 'Hockey'? I predict True.");
console.log(favSports == 'Hockey');