Projects > JS Array P2
June 07, 2021 | Vanilla JS
Day 7 Challenge of 30 day JS, implementing JS Array P2.
students.some(student => student.born > 2010); // return true
students.every(student => (student.dies - student.born) > 20);
students.find(student => student.first_name === 'Halsey');
// This return an object that contain Halsey as first name
// Check in console.log when click
students.findIndex(student => student.email.includes("doumic"));
// Return index number if exists
There are 10 records of the students, please check in the console
First Name | Last Name | Gender | Born | Dies | |
---|---|---|---|---|---|
Gerhard | Gent | ggent0@vimeo.com | Agender | 1973 | 2039 |
Halsey | Doumic | hdoumic1@hc360.com | Male | 1984 | 2087 |
Shelly | Dast | sdast2@tumblr.com | Bigender | 2011 | 2028 |
Sansone | Youd | syoud3@businessweek.com | Genderqueer | 1991 | 2054 |
Rickie | Giuron | rgiuron4@flickr.com | Female | 1989 | 2097 |
Wandie | Chipps | wchipps5@theglobeandmail.com | Agender | 1953 | 2070 |
Link | Pionter | lpionter6@1und1.de | Agender | 1981 | 2046 |
Vidovik | Klausewitz | vklausewitz7@prlog.org | Non-binary | 1990 | 2083 |
Abe | Sudell | asudell8@slideshare.net | Genderfluid | 1967 | 2076 |
Kakalina | Joney | kjoney9@tripadvisor.com | Polygender | 1991 | 2026 |