In Script Editor View:
File > New > JavaScript Source file (.js)
Paste text below, save
Execute > Compile & Run
Include files are in Pixinsight/include/pjsr.
Distribution script source files (ie examples) in Pixinsight/src/scripts.
Classes, methods, and parameters are listed in Object Explorer View. No additional docs, but names themselves are a helpful prompt.
#include <pjsr/StdIcon.jsh>
#include <pjsr/StdButton.jsh>
console.writeln("Hello world");
(new MessageBox(
"Hello world",
"",
StdIcon_Information,
StdButton_Ok
)).execute();