Clear command

You can use the special clear command to remove from the screen any element that was previously added during the trial.

Example:

[js try=”true”]newText(“helloworld”, “Hello world!”)
.print()
,
newImage(“smiley”, “ya.png”)
.print()
,
newButton(“erase”, “Erase”)
.print()
.wait()
,
clear()
,
newButton(“void”, “Enough with the emptiness”)
.print()
.wait()
[/js]

Adds a line of text, an image and an Erase button to the screen. When the Erase button is clicked, all these three elements disappear from the screen, and a new button is added to the screen, waiting to be clicked.