Cannot run a JavaScript code in a Script Task

It turns out there are two issues here.

One is that the String in the script has to be in single quote even though the JavaScript standard allows either single or double quotes.

The second issue is that the script task does not seem to execute if it is right after a boundary timeout event. I asked the second issue here Script task does not execute after boundary timeout event.