I have a map object and I would like to get the value of a specific key ( the value of key it self ) from the Map object let say we want to get 'correct'
we can get the values of 'correct' key by :
question.get('correct') // return 3
but i want :
someCode //return 'correct'
const question = new Map();
question.set('question','What is the latest version of javasript ?')
question.set(1,'es4')
question.set(2,'es5')
question.set(3,'es6')
question.set('correct',3)
question.set(true , 'correct Answer');
question.set(false , 'wrong Answer')