This is the best gs2 documentation I have found:
http://gswiki.wikidot.com/gs2-commands
This is the best for explaining how to script gs2:
http://gscript.graal.net/Index
But the best way to learn I have found that helped me the most was javascript lessons here:
http://www.freecodecamp.com