Hi Harry,
1) you have to understand logic of simplest operator: for(;;){}, while(){}, do{}while() and of course if(){}else{}, ect.
2) Just try to write something to output log via console.writeln("result: ", x, y).
3) Edit one of script and see what's happen. For example try to DrowSignature.js ( try change x,y position of signature at your image or something else ).
I hope it's help.