Skip to content

Commit 8e793a3

Browse files
committed
Initial commit
1 parent c7e18c1 commit 8e793a3

7 files changed

+42
-36
lines changed

Diff for: 07.Conditional_Expressions.js

+22-4
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,28 @@ let a = prompt("Hi please tell your age 🥺 ")
55
a = Number.parseInt(a)
66
console.log(typeof a)
77
console.log(a)
8-
if (a>0) {
9-
console.log(`Age is valid`);
10-
8+
9+
if(a=0){
10+
console.log("Age is invalid");
11+
}
12+
else if(a>9 && a<18){
13+
console.log("You are Teen!")
14+
}
15+
else if(a>=18 && a<40){
16+
console.log("You are Eighteen!")
1117
}
1218
else{
1319
console.log("Hi")
14-
}
20+
}
21+
22+
//Switch statement
23+
24+
25+
26+
27+
28+
29+
30+
a=18
31+
//Ternary operator
32+
console.log("Hi Im" , a<18? "Aditya":"Adi")

Diff for: 08.praticesets_02

Whitespace-only changes.

Diff for: 08.whileloops.js

-12
This file was deleted.

Diff for: 08.forloops.js renamed to 09.forloops.js

File renamed without changes.

Diff for: 09.for_in_loops.js renamed to 11.for_in_loops.js

File renamed without changes.

Diff for: 11.functions.js renamed to 12.functions.js

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
let a = 1;
2-
let b = 2;
3-
let c = 3;
4-
// function AverSum(a,b)
5-
// {
6-
// console.log("The Average of a and b is " + (a+b)/*/2*/)
7-
// console.log("Done")
8-
// }
9-
const AverSum = (a,b)=>{
10-
console.log("The Average of a and b is " + (a+b)/*/2*/)
11-
console.log("Done")
12-
}
13-
AverSum("Hi", " Aditya");
1+
let a = 1;
2+
let b = 2;
3+
let c = 3;
4+
// function AverSum(a,b)
5+
// {
6+
// console.log("The Average of a and b is " + (a+b)/*/2*/)
7+
// console.log("Done")
8+
// }
9+
const AverSum = (a,b)=>{
10+
console.log("The Average of a and b is " + (a+b)/*/2*/)
11+
console.log("Done")
12+
}
13+
AverSum("Hi", " Aditya");
+7-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
let obj ={
2-
harry:98,
3-
rohan:70,
4-
aakash:7
5-
}
6-
for (const key in obj) {
7-
console.log(key,obj[key])
1+
let obj ={
2+
harry:98,
3+
rohan:70,
4+
aakash:7
5+
}
6+
for (const key in obj) {
7+
console.log(key,obj[key])
88
}

0 commit comments

Comments
 (0)