function printDiagonalTextLTR(text: string): string {
let output: string = "";
for (let i: number = 0; i < text.length; i++) {
output += " ".repeat(i) + text[i] + "\n";
}
return output;
}
console.log(printDiagonalTextLTR("HELLO WORLD"));
/*
run:
H
E
L
L
O
W
O
R
L
D
*/