문제 링크 : Sort the People
/**
* @param {string[]} names
* @param {number[]} heights
* @return {string[]}
*/
var sortPeople = function(names, heights) {
const nameArr = []
names.forEach( (name, i) => {
nameArr.push([name, heights[i]])
})
return nameArr.sort((a,b) => b[1] - a[1]).map(el => el[0])
};