So first you never called your function in recursive !
function fill(square) {
if (findZero(square) === null) {
return square;
} else {
for (var w = 1; w < 4; w++) {
if (checkRC(square, x, y, w) === true) {
square[x][y] = w;
return fill(square);
}
}
}
}
Look how i placed return fill(); that's where your recursive needs to be
Your function checkRC was wrong too, here's the corrected version:
function checkRC(square, x, y, w) {
var bool = true;
for (var k = 0; k < 3 && bool; k++) {
if (square[x][k] == w || square[k][y] == w) {
bool = false;
break;
}
}
return bool;
}
I placed the bool inside the function and don't return directly the result because if it was false to the first number, it would stop.
See this fiddle