Original Array value after modification
<pre><code>var a = ["11", "22", "46", "22", "11", "55"];

console.log(a); // [ '11', '22', '46', '22', '11', '55' ]

// Calculates my values
var b = a.map(function(num) {
  return num.split('')
    .map(Number)
    .reduce(function(a, b) {
      return a + b;
    });
});
console.log(b); // [ 2, 4, 10, 4, 2, 10 ]

// Finds my biggest value
var c = 0;
for (var i = 0; i &lt; b.length; i++) {
  if (b[i] &gt; c) {
    c = b[i];
  }
}
console.log(c); // 10

// Sorts my array
var d = b;
d.sort(function(a, b) {
  return a - b;
});
console.log(d); // [ 2, 2, 4, 4, 10, 10 ]
</code></pre>

<p>I am having a problem here. The <code>var d</code> tells me about these following arrays <code>[ 2, 2, 4, 4, 10, 10 ]</code>. They originally come from this array <code>["11","22","46","22","11","55"]</code>. I am also sorting them out. So at the end in <code>var d</code> I am receiving two 10s at the end of my array. Let's say that <code>d[4]</code> originally came from <code>a[2]</code> and <code>d[5]</code> came from <code>a[5]</code>. How can I make the code tell me 10's original value from my first array. Let's say we get <code>2, 2, 4, 4, 10, 10</code>. I want this last 10 from right side value to tell me it came from <code>"55"</code>. Is there a way for me to do that?</p>