get array by array of indices js

JavaScript
var resultArr = indexArr.map(i => fruitier[i])
Source

Also in JavaScript: