Can’t help much without seeing the code, but make sure you do not use any global variables that get altered during the execution of those functions and also make sure you do not modify the grid in any of them.
There’s not much we can say without seeing the code, except that the symptoms you describe make us think that it is probably a matter of function side effects.
I edited the last two functions even though the code worked as expected without changing the checkHorizantially function
function checkHorizantially(grid){
for ( let i in grid){
if(!inspectArr(grid[i])) return false;
}
return true;
}
function inspectArr(arr){
for(let i =1;i<10;i++){
if(!arr.includes(i)) return false;
}
return true;
}