How to use map in JavaScript?
function get(){
var map = {'key1': 'value1', 'key2': 'value2'};
if ('key1' in map) {
return 'hello';
} else {
return 'kirti';
}
}
When I'm calling the get() function on button click, it can't display any output. What is wrong in above function? Why does it not display any output?