Hard
Which of the following code snippets correctly implements the map method?
1Array.prototype.myMap = function(callback) {2 // Your implementation here3};45const arr = [1, 2, 3];6const doubled = arr.myMap((x) => x * 2);7console.log(doubled); // Expected: [2, 4, 6]