diff --git a/README.md b/README.md index 2cd8be48..68a4cec8 100644 --- a/README.md +++ b/README.md @@ -266,17 +266,24 @@ Then a `pkg` directory will be created, containing everything you need for a web } // Output results - document.write(`

Sudoku solver returns:

`); + const solutionDiv = document.querySelector("#soduku-solution"); for (const solution of formattedSolutions) { - document.write(`
${solution}
`); + const newPre = document.createElement("pre"); + newPre.textContent = solution; + solutionDiv.appendChild(newPre); } - - + +

Sudoku solver returns:

+
+ +
+ + ``` Then you can serve it with your favorite http server like `python -m http.server` or `npx serve`, and access the page with your browser.