for (let i = 1; i < 10; i++) { for (let j = 1; j < i + 1; j++) { let out = ""; out += j; out += "X"; out += i; out += "=" out += (i * j); console.log(out); } console.log('\n'); }