Repository navigation
Expand file tree
/
Copy pathapp.js
More file actions
154 lines (135 loc) · 3.23 KB
/
Copy pathapp.js
File metadata and controls
154 lines (135 loc) · 3.23 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
// var a = parseInt(prompt);
// var b = parseInt(prompt);
// console.log (a+b);
// var userFirstName = prompt("Enter your first name");
// var userLastName = prompt("Enter your last name");
// console.log("hello Mr."+" "+userFirstName+" "+ userLastName)
// var city = prompt("where do you live");
// if (city === "karachi")
// {
// console.log ("it is one of the beautyfull city");
// }
// var correctCity = prompt("Enter your city");
// var score =0;
// if (correctCity === "lahore"){
// alert("correct Answer");
// score++;
// console.log (score);
// }
// var age =20;
// if (age >= 20){
// alert("you are eligible");
// } else{
// alert("you are not eligible");
// }
// var Gender = prompt("Enter Your Gender")
// if (Gender === "male");
// alert(Gender);
// var age = prompt("Enter Your Age");
// if (age === "20");
// alert(age);
// var weight = prompt("Enter your weight");
// if(weight >=)
// task..
// Q1
// var city = prompt("Enter of City");
// if(city === "karachi");
// alert("welcome to city of light");
// Q2
// var gender = prompt("Enter your gender");
// if (gender === "male");{
// massege = "welcome sir";
// alert(massege);
// }
// if (gender === "female");{
// massege = "welcome sister";
// alert(massege);
// }
// Q3
// var color = prompt("color");
// var massege = " ";
// if(color==="red") {
// massege = "must stop!!";
// alert(massege);
// }
// var color = prompt("color");
// if (color === "Yellow")
// {
// massege = "ready To Move!!";
// alert(massege);
// }
// var color = prompt("color");
// if (color === "Green");
// {
// massege = "Move Now!!";
// alert(massege);
// }
// Q4
// var Fuel = prompt("Remaining")
// if (Fuel <= 0.25){
// alert("“Please refill the fuel in your car”")
// }
// Q5
// A...
// var a = 4;
// if (++a === 5) {
// alert("given condition for variable a is true");
// } this is true
// B...
// var b = 82;
// if (b++ === 83) {
// alert("given condition for variable b is true");
// } THIS IS FALSE
// C......
// var c = 12;
// if (c++ === 13) {
// alert("condition 1 is true");
// }
// this is false
// if (c === 13) {
// alert("condition 2 is true");
// } False
// if (++c < 14) {
// alert("condition 3 is true");
// } True
// if (c === 14) {
// alert("condition 4 is true");
// } this is false
// D...
// var materialCost = 20000;
// var laborCost = 2000;
// var totalCost = materialCost + laborCost;
// if (totalCost === laborCost + materialCost) {
// alert("The cost equals");
// } this is true
// E
// if (true){
// alert("True");
// }
// if (false){
// alert("False");
// } false
// F
// if ("car" < "cat") {
// alert("car is smaller than cat");
// }
// false
// Q6
// var percent = +prompt("Enter your percentage")
// if (percent > = 80 && percent < = 100) {
// alert("A - one ")
// } else if (percent > = 70 && percent < = 80) {
// alert("A")
// } else if (percent > = 60 && percent < = 70) {
// alert("B")
// } else if (percent > = 50 && percent < = 60) {
// alert("C")
// } else if (percent > = 40 && percent < = 50) {
// alert("D")
// } else if (percent > = 30 && percent < = 40) {
// alert("E")
// } else if (percent > = 20 && percent < = 30) {
// alert("F")
// } else {
// alert("You didnot write correcte percentage")
// }