-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJS_Assignment_Q24.js
More file actions
54 lines (41 loc) · 2.05 KB
/
JS_Assignment_Q24.js
File metadata and controls
54 lines (41 loc) · 2.05 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
let L_variable_1 = "Karachi"
let L_variable_2 = "Pakistan"
let L_variable_3 = "Karachi"
console.log('L_variable_1 == L_variable_2 ', L_variable_1 == L_variable_2) ;
console.log("L_variable_1 != L_variable_2 ",L_variable_1 != L_variable_2) ;
console.log("L_variable_1 == L_variable_3 " , L_variable_1 == L_variable_3) ;
console.log("L_variable_1 != L_variable_3 ",L_variable_1 != L_variable_3) ;
console.log("Working on Lower condation") ;
L_variable_1 = "Karachi";
L_variable_2 = "Karachi";
console.log("L_variable_1.toLowerCase == L_variable_2.toLowerCase ", L_variable_1.toLowerCase == L_variable_2.toLowerCase) ;
console.log("L_variable_1.toLowerCase != L_variable_2.toLowerCase ", L_variable_1.toLowerCase != L_variable_2.toLowerCase) ;
console.log("Working on Number condation") ;
let L_NUMBER_1 = 5;
let L_NUMBER_2 = 10;
let L_NUMBER_3 = 5;
console.log("L_NUMBER_1 == L_NUMBER_2 ", L_NUMBER_1 == L_NUMBER_2) ;
console.log("L_NUMBER_1 != L_NUMBER_2 " , L_NUMBER_1 != L_NUMBER_2) ;
console.log("L_NUMBER_1 < L_NUMBER_2 " , L_NUMBER_1 < L_NUMBER_2 );
console.log("L_NUMBER_1 > L_NUMBER_2 ", L_NUMBER_1 > L_NUMBER_2) ;
console.log("L_NUMBER_1 <= L_NUMBER_2 " , L_NUMBER_1 <= L_NUMBER_2);
console.log("L_NUMBER_1 >= L_NUMBER_2 ", L_NUMBER_1 >= L_NUMBER_2);
console.log("L_NUMBER_1 == L_NUMBER_3 ", L_NUMBER_1 == L_NUMBER_3) ;
console.log("L_NUMBER_1 != L_NUMBER_3 " , L_NUMBER_1 != L_NUMBER_3) ;
console.log("Working on AND & OR OPERATOR condation") ;
let a = true;
let b = false;
console.log("a && b" ,a && b ) ;
console.log("a || b",a || b) ;
console.log("Test whether an item is in a array") ;
let l_array = [1, 2, 3, 4, 5];
let l_item_1 = 3;
let l_item_2 = 8;
console.log(l_item_1 in l_array) ;
console.log(l_item_2 in l_array) ;
console.log("Test whether an item is not in a array") ;
let l_array_2 = [1, 2, 3, 4, 5];
let l_item = 7;
console.log("l_array_2.indexOf(l_item) == -1 ",l_array_2.indexOf(l_item) == -1 );
console.log("l_array_2.indexOf(l_item) !== -1 ",l_array_2.indexOf(l_item) !== -1 );
console.log("!l_array_2.includes(l_item) ",!l_array_2.includes(l_item));