var isMember = gs.getUser().isMemberOf('Helpdesk'); gs.print(isMember)
isMemberOf() function returns true if the user is a member of the given group, false otherwise. ServiceNow
Working Code Edited question July 20, 2023
var isMember = gs.getUser().isMemberOf('Helpdesk'); gs.print(isMember)