문제 링크 : Shuffle String
/**
* @param {string} s
* @param {number[]} indices
* @return {string}
*/
var restoreString = function(s, indices) {
const result = new Array(s.length)
indices.forEach( (el, idx) => {
result[el] = s[idx]
})
return result.join('')
};