Write a function namesAboveNine(entries) that stores names and scores in a map and returns the names with a score greater than 9.
entries is an array of pairs [name, score]: the name is a string, the score is a number. A name can be any string, also one made of digits, like '7'. The array can be empty.Map: the name is the key, the score is the value.Map (the place of its first appearance).Map is strictly greater than 9. A score of exactly 9 does not count.Map.Map. The tests check only the result; keep to the rule yourself.namesAboveNine([['Sachin', 9.2], ['Isha', 7.6]])Returns [ 'Sachin' ]
namesAboveNine([['Isha', 7.6], ['Sachin', 9.2], ['Isha', 9.9]])Returns [ 'Isha', 'Sachin' ]
namesAboveNine([])Returns []
Asked at EPAM · Source
namesAboveNine([ [ 'Sachin', 9.2 ], [ 'Isha', 7.6 ] ])[ 'Sachin' ]namesAboveNine([ [ 'Ann', 9.5 ], [ 'Bob', 10 ], [ 'Cid', 3 ] ])[ 'Ann', 'Bob' ]Hidden tests run on Submit.