JavaScript: Better way to sort an array by setting custom index
Updating my comments on current implementation, Thanks @Mast for pointing out.


You have used let for output, targetIndex and title. None of
them never updated. const is better suitable here. 
Usage of value.title.indexOf('_') is repeated. you can use variable.
You can avoid substring usage because you are already did value.title.split('_') and you can use index 1 value from result
    array.


Apart from these minor points, code looks good to me.

As you asked, Here is alternative ES6 implementation.


Use arrow function
With reduce and using destructure in input function arguments and have the default value for title.
In reduce function use destucture to get the values from split result.




const data = [{"title": "100_baz"}, {"title": "01_foo"}, {"title": "05_bar"}];

const indexSort = data =&gt; data.reduce((acc, {title = ''}) =&gt; {
  const [num, value] = title.split('_');
  acc[Number(num)] = value;
  return acc;
}, []);

console.log(indexSort(data));