2
* @param {character[][]} board6
var placeWordInCrossword = function (board, word) {7
for (let i = 0; i < board.length; i++) {8
for (let j = 0; j < board[0].length; j++) {9
if (i === 0 || board[i - 1][j] === "#") {10
if (match(getFill(i, j, false))) {14
if (j === 0 || board[i][j - 1] === "#") {15
if (match(getFill(i, j, true))) {23
function getFill(x, y, goRight) {28
y < board[0].length &&32
? board[x][y] + getFill(x, y + 1, goRight)33
: board[x][y] + getFill(x + 1, y, goRight);39
if (str.length !== word.length) {45
let r = str.length - 1;46
for (let each of word) {47
if (!fromLeft && !fromRight) {51
if (each !== str[l] && str[l] !== " ") {57
if (each !== str[r] && str[r] !== " ") {63
return fromLeft || fromRight;