Skip to main content

JavaScript Question 115

Question 115 of 0JavaScript

Which method(s) will return the value `'Hello world!'`?

Login Required

Please login to select answers and solve this question. You can view the question without logging in.

Code:
const myMap = new Map();
const myFunc = () => 'greeting';

myMap.set(myFunc, 'Hello world!');

//1
myMap.get('greeting');
//2
myMap.get(myFunc);
//3
myMap.get(() => 'greeting');

Select the correct option: