Difference between console.log() and jslog()

The output of the console.log() method is visible in the JavaScript console available in the browser's developer tool. Whatever you output using console.log() will be available to all end users regardless of their group or roles. If they have access to the form or the page where the client-side script is included and that particular line of code executes, they can see the output in the browser's console log, as shown here:

On the other hand, jslog() entries are only accessible by users with the admin role and the log entry can only be seen in the JavaScript Log window.

Get ServiceNow Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.