How to trigger Notification Centre notification from JavaScript?
From Terminal,

osascript -l JavaScript -e "app=Application.currentApplication(); app.includeStandardAdditions = true; app.displayNotification('Hello, world', {withTitle: 'Title'})"


From Script Editor,

app = Application.currentApplication()
app.includeStandardAdditions = true
app.displayNotification('Hello, world', {withTitle: 'Title'})