Start off by installing Grasp.
Next, read over the concepts behind Grasp.
Then run grasp --help
, or check out the options page, and get a feel for the program.
Take a quick look at the JavaScript syntax.
Then try out some equery on your favourite JavaScript file.
Once you’ve expiremented with that, take a look at squery and try some more complicated searches.
Finally, use what you’ve learned and try to replace one of your searches.
If you are really curious, and are considering developing a tool that uses Grasp, learn how to use it as a library.