For this Question: Given a matrix of size M*N, your task is to find the column having the maximum sum and print the sum.The first line of input contains two space-separated integers M and N. The following M lines of input contain N space-separated integers each depicting the values of the matrix.

Constraints:-
1 <= M, N <= 100
1 <= Matrix[][] <= 100000Print the maximum sum.Sample Input:-
3 3
1 2 3
4 5 6
7 8 9

Sample Output:-
18

Explanation:-
1 + 4 + 7 = 12
2 + 5 + 8 = 15
3 + 6 + 9 = 18
maximum = 18

Sample Input:-
3 2
1 4
9 6
9 1

Sample Output:-
19, I have written this Solution Code:     // mat is the matrix/ 2d array
    // the dimensions of array are:- a rows, b columns
    function colMaxSum(mat,a,b) {
        // write code here
        // do not console.log
        // return the answer as a number
        
        let idx = -1;

        // Variable to store max sum
        let maxSum = Number.MIN_VALUE;

        // Traverse matrix column wise
        for (let i = 0; i < b; i++) {
            let sum = 0;

            // calculate sum of column
            for (let j = 0; j < a; j++) {
                sum += mat[j][i];
            }

            // Update maxSum if it is
            // less than current sum
            if (sum > maxSum) {
                maxSum = sum;

                // store index
                idx = i;
            }
        }

        let res;

        res = [idx, maxSum];

        // return result
        return maxSum;
    }


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