These are just my personal notes as I was working through the New to ServiceNow training modules.
In ServiceNow, I start by selecting All > Studio and then selected my app. Near the bottom of my Catalog Item app I select the Catalog Client Scripts tab and select New.
And then I create a super simple script that will create a "Hello World" alert onLoad.
And when I got to the URL for my Catalog App, "Hello World" does pop-up. Nice - it works!
Or one of these can be used:
g_form.addInfoMessage()
g_form.addErrorMessage()
g_form.showFieldMessage()
function onLoad() {
g_form.addErrorMessage("Hello World");
}