For this Question: Implement Selection Sort on a given array, and make it sorted.First line of the input contains an integer, N, which denotes the length of the array. Next N inputs are elements of the array that is to be sorted in ascending order. 

Constraints
1<=N<=1000
-10000<=Arr[i]<=10000Sorted output where each element is space separatedSample Input:
3
3 1 2

Sample Output:
1 2 3, I have written this Solution Code:  // arr is unsorted array
    // n is the number of elements in the array
    function selectionSort(arr, n) {
        // write code here
        // do not console.log the answer
        // return sorted array
        return arr.sort((a, b) => a - b)


    }

, In this Programming Language: JavaScript, Now tell me if this Code is compilable or not?