Contenido del Curso
JavaScript Data Structures
1. Introduction and Prerequisites
2. Objects Fundamentals
3. Advanced Object Manipulation
JavaScript Data Structures
Challenge: Filtering Students by Exam Scores
Task
Given an array of student objects, use the filter()
method to create a new array called highScorers
that includes only the students with exam scores greater than or equal to 90.
- The original array is given as
students
, containing objects representing students with propertiesname
andscore
. - Check if the student's score is greater or equal to 90.
- Use the
filter()
method on thestudents
array to create a new array,highScorers
, that includes only the students with high scores.
Expected output:
The filter()
method will create a new array by including only the elements that satisfy the condition specified in the callback function.
¿Todo estuvo claro?
Contenido del Curso
JavaScript Data Structures
1. Introduction and Prerequisites
2. Objects Fundamentals
3. Advanced Object Manipulation
JavaScript Data Structures
Challenge: Filtering Students by Exam Scores
Task
Given an array of student objects, use the filter()
method to create a new array called highScorers
that includes only the students with exam scores greater than or equal to 90.
- The original array is given as
students
, containing objects representing students with propertiesname
andscore
. - Check if the student's score is greater or equal to 90.
- Use the
filter()
method on thestudents
array to create a new array,highScorers
, that includes only the students with high scores.
Expected output:
The filter()
method will create a new array by including only the elements that satisfy the condition specified in the callback function.
¿Todo estuvo claro?