-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathex_23.ts
43 lines (30 loc) · 1.2 KB
/
ex_23.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
// 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 myCar = "Alto";
// console.log(myCar == "Alto");
// single (=) is used for assigning and (==) is used for comparison
// 10 statements true and false
//1
let myFruit = "Apple";
// console.log(myFruit == "Apple");
// console.log(myFruit == "apple");
//2
let myArray = [13, 3, 9];
// console.log(myArray.length == 3);
// console.log(myArray.length == 4);
//3
let stdName = "Ali";
// console.log(stdName == "Ali");
// console.log(stdName == "ali");
//4
let mySchool = "Government";
// console.log(mySchool == "Government");
// console.log(mySchool === "Government");
//5
let lang = "Urdu";
console.log(lang == "UrdU");
console.log(lang === "Urdu");