Also, to learn code I like to look at code that experts have written. Both books (#3 and #4 above), have free code to download and look at. Just go to the linked pages above, scroll to the bottom of the page that says "Details", and there is a link for "Example Code and Data". You do have to sign in to download this, but it's free.
Once you're inside of JMP, here's a few places to look. First, you can make JSL editing more friendly by adjusting the preferences. Some of the things I like to do include turn line numbers on and show embedded log in the script window.
On the Mac, Preferences are under the JMP menu.
On Windows, Preferences are under the File menu.
The most useful tool for scripting inside of JMP is under the Help Menu and is called the Scripting Index. You can search by key word, and the commands are nested in the two columns.
When you're inside the Scripting Index, and you're using a command, you have an interactive scripting window with the log below it. You can read about the command, run the example script, see the log, and in general use this as a sandbox to experiment with JSL commands.
For example, using the Charater command Length, I can see in the log the answer to the question "How long is the word "café"?" is 4. I can type another word instead of "café" and see the result in the log. Other examples launch analyses, create dialog boxes, etc.