How to delete print(text) when new print(text) shows up later in code?

#1

For instance here is an example.

Print(“welcome, to get started choose a shape”);

Ball.on(click, ___)
=> {
Ball.transition().attr(x,100).attr(y,100).duration(2000);
Print(“you chose the ball instead of the square!”);
}

I want to delete the first text upon clicking the ball and causing new text.

On another note, I was super super super surprised at how much I remembered of the format of the code without having to look XD

How to use print() for dialogue. How to update the string?