text: /*
      HackerRank : JatinChauhan
  */
  
  //  Problem: https://www.hackerrank.com/challenges/js10-arrays/problem
  
  /**
  *   Return the second largest number in the array.
  *   @param {Number[]} nums - An array of numbers.
  *   @return {Number} The second largest number in the array.
  **/
  function getSecondLargest(nums) {
      // Complete the function
      var sorted_array = nums.sort(function (a,b) {return a - b;});
      var unique_sorted_array = sorted_array.filter(function(elem, index, self) {
          return index === self.indexOf(elem);
      })
  
      return unique_sorted_array[unique_sorted_array.length - 2];
  }
  