- or download this
function initMemory() {
memory.counter = 0;
}
...
function printCounter() {
log("Current count is " + memory.counter);
}
- or download this
#!/usr/bin/env perl
package ReportingHandler;
...
$jsh->call('incCounter', 23);
$jsh->call('printCounter');
}
- or download this
package PageCamel::Helpers::JavaScript;
#---AUTOPRAGMASTART---
use 5.030;
...
}
1;
- or download this
First run
DEBUG: Current count is 0
DEBUG: Current count is 42
...
Second run
DEBUG: Current count is 42
DEBUG: Current count is 65