8000 Js Revision · anshi-the-coder/Javascript@72d7156 · GitHub
[go: up one dir, main page]

Skip to content

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

8000
Appearance settings

Commit 72d7156

Browse files
Js Revision
1 parent 7545c38 commit 72d7156

File tree

7 files changed

+29
-27
lines changed

7 files changed

+29
-27
lines changed

Revision.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
let a =[2,1,5,3,4]
2-
// let arr=a.filter((value)=>{
3-
// return value%2==0
4-
// })
5-
// console.log(arr)
2+
let arr1=a.filter((value)=>{
3+
return value%2==0
4+
})
5+
console.log(arr1)
66

7-
// let arr = a.map((value,index)=>{
8-
// return value*index
9-
// })
10-
// console.log(arr)
7+
let arr2 = a.map((value,index)=>{
8+
return value*index
9+
})
10+
console.log(arr2)
1111

1212
let arr=a.reduce((h1,h2)=>{
1313
return h1+h2

object.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ let anshikaBioData = {
44
likes: ["mango", "noodels", "pizza"],
55
parent: {
66
mummy: {
7-
name: "Raajo",
7+
name: "Rajo",
88
age: 43,
99
},
1010
papa: {
@@ -14,7 +14,7 @@ let anshikaBioData = {
1414
},
1515
}; // key->value pair.....copy ki name chit
1616

17-
// console.log(anshikaBioData.parent.papa.age)
17+
console.log(anshikaBioData.parent.papa.age)
1818

1919
for (let key in anshikaBioData) {
2020
console.log(key);

reduceTest.java

Whitespace-only changes.

reduceTest.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ let a2 =arr.filter((value)=>{
99
console.log(a2)
1010

1111

12-
// let arr = ["Cat","Buffelo","Tiger","Elephant","Dog"]
13-
// let a1 = arr.filter((value)=>{
14-
// return value.length>=5
15-
// })
16-
// console.log(a1)
12+
let arr1 = ["Cat","Buffelo","Tiger","Elephant","Dog"]
13+
let a3 = arr1.filter((value)=>{
14+
return value.length>=5
15+
})
16+
console.log(a3)
1717

18-
// let arr=["Anshika","Alok","Rajo","Umesh"]
19-
// let a = arr.map((value)=>{
20-
// return value+" "+"Gangwar"
21-
// })
22-
// console.log(a)
18+
let arr2=["Anshika","Alok","Rajo","Umesh"]
19+
let a = arr2.map((value)=>{
20+
return value+" "+"Gangwar"
21+
})
22+
console.log(a)

stringMethods.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
// let name = "Harry"
2-
// // console.log(name.length)
1+
// let name = "Harry"
2+
// console.log(name.length)
33

44
// // console.log(name.toUpperCase())
55
// // console.log(name.toLowerCase())
6-
// // console.log(name.slice(2,4))
6+
//console.log(name.slice(2,4))
77
// // console.log(name.slice(2))
88
// // console.log(name.replace("Har", "Per"))
99
// let friend = "Naman"

stringPracticeSet.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ console.log(word.toUpperCase())
1010
// problem 4
1111
let str2 = "Please give Rs 1000"
1212
let amount = Number.parseInt(str2.slice(15))
13-
// console.log(amount)
14-
// console.log(typeof amount)
13+
console.log(amount)
14+
console.log(typeof amount)
1515

1616
// // problem 5
17-
// let friend= "Deepika"
18-
// console.log(friend)
17+
let friend= "Deepika"
18+
console.log(friend)
1919

tempCodeRunnerFile.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
let a= prompt("hey whats your age")
2+
console.log(typeof a)

0 commit comments

Comments
 (0)
0