You will make use of
delete method on Map to find the output of the code
let mapping = new Map([[1, 2], [2, 3], [3, 4]])mapping.delete()console.log(mapping)
00:01 In this question, we are creating a new map from a two dimensional array. Then, we call the delete method on this newly created map. Finally, we are printing the value of map on the console. Let's work together to find the right answer. In the first line we create a map with entries taken from 2D array. Each entry represents a key value pair. Once the map is created, the variable mapping contains the entry as we see here. In the next line we call the method called delete on the mapping variable. The delete method takes the key of the entry and deletes the corresponding entry if the key is found. Since we did not pass any key, no deletions will be made. Therefore, when the next line executes, it prints the entire map on the console, which is the correct answer. Let's run it on the editor to make sure that our understanding is correct.