Selection sort algorithm examination
Yes, it could be simpler.


Special case for first value is not needed.
Some variables could be removed.
All variables initialization could be removed.


Below, you can see your code reviewed.

    function selectionSort(inputArray) {
      for (var i = 0; i &lt; (inputArray.length - 1); i++) {
         var minNum = inputArray[i];
         var swapElementIndex = i;
         for (var currentIndex = i + 1; currentIndex &lt; inputArray.length; currentIndex++) {    
            if (inputArray[currentIndex] &lt; minNum) {
                swapElementIndex = currentIndex;
                minNum = inputArray[swapElementIndex];
            }    
        }
        if (i != swapElementIndex) {
            var temp = inputArray[i];
            inputArray[i] = inputArray[swapElementIndex];
            inputArray[swapElementIndex] = temp;
        }
     }
     return inputArray;
    }