-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathqno23.ts
48 lines (47 loc) · 1.89 KB
/
qno23.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
// Qno.23
// 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.
// CONDITION NO 1:
let place:string='London';
console.log("Is place == 'London'? I predict TRUE!")
console.log(place == 'London');
// CONDITION NO 2:
let food: string='Kabab';
console.log("Is food === 'Kabab'? I predict TRUE!")
console.log(food === 'Kabab');
// CONDITION NO 3:
let color:string='Crimson Red';
console.log("is color === 'Cimson Red'? I predict True!")
console.log(color === 'Cimson Red');
// CONDITION NO 4:
let her_Name :string='Alishba';
console.log("Is her Name == 'Alisha'? I predict True!");
console.log(her_Name == 'Alisha');
// CONDITION NO 5:
let flower:string='lilly';
console.log("Is flower == 'lilly'? I predict TRUE!!")
console.log(flower== 'lilly');
// CONDITION NO 6:
let conqueror:string="Hiba";
console.log("Is conqueror == 'Hiba'? I predict False!!")
console.log( conqueror != "Hiba");
// CONDITION NO 7:
let Fruit:string= 'Mango';
console.log("Is fruit =='Mango'? I predict False!!")
console.log(Fruit != 'Mango');
// CONDITION NO 8:
let fruit:string= 'Ananas';
console.log("Is fruit =='Mango'? I predict False!!")
console.log(fruit != "Mango");
// CONDITION NO 9:
let his_Name:string="khurram";
console.log("Is his name == 'Arham'? I predict False!!")
console.log(his_Name!= "Arham");
// CONDITION NO 10:
let my_friend:string="Rubab";
console.log("Is my friend =='Fatima'? I predict True!")
console.log(my_friend== "Fatima");