Instructions
- 1. Your final score will reflect your grasp of the concepts—approach each question with precision.
- 2. Thoroughly review each solution before proceeding to ensure full understanding.
- 3. Final results will be available after submission to provide insights into areas for further improvement.
- 4. Maintain academic integrity—plagiarism undermines learning and professional growth.
- 5. Once submitted, responses are final, so ensure you’re confident in your answers.
- 6. These challenges are designed to test practical knowledge; apply your skills as you would in real-world scenarios.
All Problems
Question
Action
Which array method executes a provided function once for each array element?
What is the return value of forEach()?
Which method transforms an array by calling a provided function on each element and returns a new array?
What is the result of the following code?
Which method can be used to create a new array with elements that pass a test defined in a function?
What does the following code return?
What is the result of calling the reduce() method on an array?
What is the output of the following code?
Which method can be used to check if all elements in an array pass a specific test?
Which method can be used to check if at least one element in an array passes a specific test?
Which array method executes a provided function once for each array element?
What is the return value of forEach()?
Which method transforms an array by calling a provided function on each element and returns a new array?
What is the result of the following code?
var arr = [1, 2, 3]; var doubled = arr.map(x => x * 2); console.log(doubled);
Which method can be used to create a new array with elements that pass a test defined in a function?
What does the following code return?
var arr = [10, 20, 30, 40]; var result = arr.filter(x => x > 25); console.log(result);
What is the result of calling the reduce() method on an array?
What is the output of the following code?
var arr = [1, 2, 3, 4]; var sum = arr.reduce((total, num) => total + num); console.log(sum);