Skip to content

Commit 2308976

Browse files
committed
again update on arrow function and a small redux
1 parent 148a62b commit 2308976

4 files changed

Lines changed: 87 additions & 0 deletions

File tree

05Advance-basic/arrayarrow.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
const myTodo = [{
2+
title : 'akhil'
3+
, isDone : true
4+
},{
5+
title : 'athul',
6+
isDone : true
7+
},{
8+
title : 'ajith-binu' ,
9+
isDone : true
10+
}]
11+
12+
const letter = myTodo.filter((title) =>
13+
title.isDone === true
14+
15+
)
16+
17+
console.log(letter)

05Advance-basic/arrowadv.js

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
const myTodo = [{
2+
title : 'lets do',
3+
isDone : true
4+
},{
5+
title:'wakeup',
6+
isDone : true
7+
},{
8+
title:'brush your teeth',
9+
isDone:true
10+
},{
11+
title : 'have a bath',
12+
isDone:true
13+
},{
14+
title: 'move on',
15+
isDone: true
16+
},{
17+
title:'still walking',
18+
isDone : false
19+
}]
20+
21+
// const search = myTodo.filter((title) => title.isDone === false)
22+
23+
// const title = search.map((todo)=> todo.title)
24+
25+
// console.log(title)
26+
27+
const camera = {
28+
name : 'canon',
29+
weight : 600 ,
30+
price : 2000,
31+
32+
myDes: function(){
33+
return `the price of the camera is ${this.price}` // here we can also use camera.price also
34+
}
35+
}
36+
37+
// console.log(camera.myDes())
38+
39+
40+
// this is a redux sample
41+
// const func = () => ({key:'value'});

05Advance-basic/assignarray.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
const myTodo = [{
2+
title : 'lets do',
3+
isDone : true
4+
},{
5+
title:'wakeup',
6+
isDone : true
7+
},{
8+
title:'brush your teeth',
9+
isDone:true
10+
},{
11+
title : 'have a bath',
12+
isDone:true
13+
},{
14+
title: 'move on',
15+
isDone: true
16+
},{
17+
title:'still walking',
18+
isDone : false
19+
}]
20+
21+
const search = myTodo.filter((title) => title.isDone === false)
22+
23+
const title = search.map((todo)=> todo.title)
24+
25+
console.log(title)

note.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,10 @@ refer mdn docs and dice.js
241241

242242
refer trelloV4.js in 04Intermediate it contain lot of things about array in javascript
243243

244+
in 05 Advance first refer arrow.js thsn arrowadv.js then assignarray.js then move on to arrayarrow.js
245+
246+
247+
244248

245249

246250

0 commit comments

Comments
 (0)