title: Function that finds largest pair sum in unordered array of integers
body: <p>I want to write a function that, given a sequence of unordered numbers, finds the largest pair sum.</p>
  
  <pre><code>largestPairSum([10, 14, 2, 23, 19]) --&gt; 42 (i.e. sum of 23 and 19)
  largestPairSum([99, 2, 2, 23, 19])  --&gt; 122 (i.e. sum of 99 and 23)
  largestPairSum([-10,-20,-30,-40])   --&gt; -30 (i.e sum of -10 and -20)
  </code></pre>
  
  <p>My try</p>
  
  <pre><code>function largestPairSum(numbers)
  {
     let counter =0;
     let numbersord = numbers.sort();
  
     if (numbersord[0] === -numbersord[0]) {
         numbersord.reverse()
         counter=numbersord[0]+numbersord[1]
         }
  
     else {
         counter=numbersord[-1]+numbersord[-2]
      }
    return counter
  }
  </code></pre>
  
  <p>When invoked, the function says 'NaN' , however when I </p>
  
  <pre><code>
  console.log(typeof(numbersord[0]))
  
  </code></pre>
  
  <p>it says number. Not sure where I have gone wrong, thanks for reading!</p>