diff --git a/subjects/crossword/README.md b/subjects/crossword/README.md index 2d2c01d6..8d81d7ea 100644 --- a/subjects/crossword/README.md +++ b/subjects/crossword/README.md @@ -2,7 +2,7 @@ ### Instructions -Create the function `crosswordSolver` that is able to solve an empty crossword puzzle. +Create the function `crosswordSolver` that is able to solve an empty crossword puzzle. The function must be submitted in a file named `crosswordSolver.js`. The function takes two arguments: 1. an empty puzzle, passed as a string and @@ -12,7 +12,7 @@ The function must print on the console a string representing the puzzle filled w The empty puzzle will be a string with the following rules: - each character will be either a number, a `.` or a `\n`; -- a number represent the number of words starting from the specific position and a `.` represent a space that does not need to be filled. +- a number represents the number of words starting from the specific position and a `.` represents a space that does not need to be filled. If the puzzle or list of words provided as inputs does not guarantee a unique solution, or any other conditions stated above are not met, the function must print `'Error'`. @@ -28,7 +28,8 @@ const emptyPuzzle = ` const words = ['casa', 'alan', 'ciao', 'anta'] -console.log(crosswordSolver(emptyPuzzle, words)) +crosswordSolver(emptyPuzzle, words) + /* output: ` casa