let a = [ [1, 2, 3], [4, 5, 6], [7, 8, 9] ] const prompt = require('prompt-sync')({ sigint: true }); ticTacToe(a); function ticTacToe(a) { let pipe = "|"; for (let x = 0; x < a.length; x++) { let row = a[x]; let column = ''; for (let y = 0; y < row.length; y++) { column = column.toString() + pipe; column = column.toString() + row[y].toString(); } column = column.toString() + pipe; console.log(column) } } getUserInput(); function getUserInput() { return prompt("Was ist deine Eingabe?"); } //console.log(input);