let str = ''; for (let i = 0; i < 10; i++) { str += '\n'; for (let i = 0; i < 10; i++) { str += i; } } console.log(str);