MCPcopy Index your code
hub / github.com/TheAlgorithms/JavaScript / printBoard

Method printBoard

Backtracking/Sudoku.js:63–77  ·  view source on GitHub ↗
(output = (...v) => console.log(...v))

Source from the content-addressed store, hash-verified

61 }
62
63 printBoard(output = (...v) => console.log(...v)) {
64 // helper function to display board
65 for (let i = 0; i < 9; i++) {
66 if (i % 3 === 0 && i !== 0) {
67 output('- - - - - - - - - - - -')
68 }
69 output(
70 ...this.getSection(i, [0, 3]),
71 ' | ',
72 ...this.getSection(i, [3, 6]),
73 ' | ',
74 ...this.getSection(i, [6, 9])
75 )
76 }
77 }
78}
79
80export { Sudoku }

Callers

nothing calls this directly

Calls 3

getSectionMethod · 0.95
outputFunction · 0.85
logMethod · 0.45

Tested by

no test coverage detected