function printTextDiagonallyRecursivelyLTR(spaces: string, text: string): void {
if (text.length > 0) {
console.log(spaces + text[0]);
printTextDiagonallyRecursivelyLTR(spaces + " ", text.substring(1));
}
}
printTextDiagonallyRecursivelyLTR("", "HELLO WORLD");
/*
run:
H
E
L
L
O
W
O
R
L
D
*/