-
Notifications
You must be signed in to change notification settings - Fork 2
/
practice.js
42 lines (32 loc) · 1.2 KB
/
practice.js
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
const myevents = [
{
event_name: "Kotlin event", event_venue: "Lekki", event_startdate: "10-04-2020", event_enddate: "14-04-2020", total_number_of_attendee: 20
},
{
event_name: "Google Africa scholarship", event_venue: "Victoria island", event_startdate: "14-04-2020", event_enddate: "18-04-2020", total_number_of_attendee: 30
},
{
event_name: "Testing event", event_venue: "Lekki", event_startdate: "18-04-2020", event_enddate: "22-04-2020", total_number_of_attendee: 35
},
{
event_name: "Kotlin event-2", event_venue: "Ajah", event_startdate: "22-04-2020", event_enddate: "26-04-2020", total_number_of_attendee: 15
},
{
event_name: "Scholarship event", event_venue: "Oshodi", event_startdate: "30-04-2020", event_enddate: "03-05-2020", total_number_of_attendee: 28
},
{
event_name: "Sprint event", event_venue: "Surulere", event_startdate: "07-05-2020", event_enddate: "11-05-2020", total_number_of_attendee: 43
},
]
//For loop
// for(let i = 0; i < myevents.length; i++){
// console.log(myevents[i].event_name);
// }
//ForEach loop
myevents.forEach((myevent)=>{
console.log(myevent);
})
// Filter
// Map
//Sort
// Reduce