Web Technology
primer-original-v2easyJavaScriptArray MethodsmapforEachprimer-original-v2

What does Array.map() return that Array.forEach() does not?

Answer options

A
Nothing — they are the same
B
A new array with the results of calling the callback on each element
C
A boolean indicating success
D
The original array, modified in place

Correct answer: A new array with the results of calling the callback on each element

Explanation

Quick AnswerThe correct answer is A new array with the results of calling the callback on each element because it directly addresses the core logic of Web Technology.

This question has been retained as-is due to its unique context.

Related Web Technology questions

Practice more Web Technology questions

PrimerPrep has independently reviewed practice questions and coding exercises — all free.