I want to return multiple values from JS in runScript. It’s impossible to return many values at once so i use a little trick and try something like this:
runScript | var i = 1; var j = 2; var k = 3; |
runScript | return i; | i
runScript | return j; | j
runScript | return k; | k
In first run, command with return “i” throw an error that “i” is not declared. So i change first runScript to addScript and then it’s works fine. Furthermore when i change it back to runScript it work fine from now on. It’s just happening from time to time. It’s not a big deal because after change command ot works fine but what if it will happen in real live situation not just checking how to return many values? It could be frustrating then.