Modern JavaScript from the Beginning - Second Edition - Array.filter Method
Interactive Video
•
Information Technology (IT), Architecture
•
University
•
Practice Problem
•
Hard
Wayground Content
FREE Resource
Read more
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a key difference between 'forEach' and 'filter'?
'forEach' modifies the original array.
'filter' returns a new array based on a condition.
'forEach' is used for mathematical operations.
'filter' does not return any value.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In the example with words, what is the purpose of the arrow function?
To modify the original array.
To test each word's length.
To sort the words alphabetically.
To convert words to uppercase.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you filter even numbers from an array using 'filter'?
By checking if the number is greater than 5.
By using a 'forEach' loop.
By converting numbers to strings.
By using the modulus operator to check divisibility by 2.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a disadvantage of using 'forEach' compared to 'filter'?
'forEach' is faster than 'filter'.
'forEach' requires more lines of code to achieve the same result.
'forEach' can only be used with strings.
'forEach' automatically sorts the array.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
When filtering company objects, what condition is used to find retail companies?
Checking if the company has more than 100 employees.
Checking if the company name starts with 'R'.
Checking if the company is based in a specific location.
Checking if the company category is 'retail'.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you filter companies that started after 1980 and ended before 2005?
By using conditions on both start and end dates.
By checking if the end date is greater than 2005.
By filtering based on company revenue.
By checking if the start date is less than 1980.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What condition is used to filter companies that lasted 10 years or more?
Checking if the company has more than 10 employees.
Checking if the company name has more than 10 characters.
Checking if the difference between end and start dates is 10 or more.
Checking if the company is in the technology sector.
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
Discover more resources for Information Technology (IT)
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
5 questions
Poetry Interpretation
Interactive video
•
4th Grade - University
19 questions
Black History Month Trivia
Quiz
•
6th Grade - Professio...
15 questions
Review1
Quiz
•
University
15 questions
Pre1
Quiz
•
University