Projects > JS Array P2

Home Projects Challenges

JS Array P2


June 07, 2021 | Vanilla JS

Day 7 Challenge of 30 day JS, implementing JS Array P2.

Use Some function to find is there anyone that is older born after 2010?

students.some(student => student.born > 2010); // return true

Use Every function to find if everyone age is more than 20 years?

students.every(student => (student.dies - student.born) > 20);

Use Find function to find if anyone first name is Halsey?

students.find(student => student.first_name === 'Halsey');
// This return an object that contain Halsey as first name
// Check in console.log when click

Use Find Index function to find which index contains 'Doumic' in their email

students.findIndex(student => student.email.includes("doumic"));
// Return index number if exists

Students:

There are 10 records of the students, please check in the console


↤ Go Back

Updated in June 07, 2021
Gmail | Proton | LinkedIn | Github
Alright reserved 2021