Easy way to update text in terminal (instead of printing more text)?

Linking here one example of ANSI escape sequence suggested by Steve.

And sample code here below for easier reference:

for n in 1:100
    print("Iteration number $n/100\u001b[1000D")
    sleep(0.002)  # to simulate code waiting time
end