Tell us what’s happening:
While the test cases are good as they cover the rectangle use case.
They still miss a single-column/single-row test case.
Another thing that I’d like to report is that the system doesn’t print javascript errors in console. Please add this capability to print the error along with the current line number.
Your code so far
function spiralMatrix(matrix) {
return matrix
}
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36
Challenge Information:
Daily Coding Challenge - Spiral Matrix
https://www.freecodecamp.org/learn/daily-coding-challenge/2026-04-12
