Why does "run (tell (sprite) to (call (JavaScript function (anonymous) {alert("...")" run forver?

I ran the script in the title and my browser kept showing me the alert message forever! The popup went away after clicking OK but returned again. Why does it happen?

alert returns undefined, which means the reporter doesn't return anything. If you click the call reporter, you get an alert box, but the reporter doesn't have a result speech bubble. If a reporter that reports undefined or doesn't report anything is used as an input, it is reevaluated, I guess to try to get a value.

By naming a function?

has nothing to do with it.

run (tell (sprite) to (call (JavaScript function (anonymous) {alert(“…”);return 'abc';}

I see.

Thank you. I will give it a try.