I'm diving into a website I've been tasked to explore. While my HTML skills are limited, I'm eager to retrieve some SharePoint information using JavaScript. I launched my console and experimented with:
var value = SP.Web.get_currentUser();
, unfortunately resulted in an Uncaught TypeError.
However, _spPageContextInfo.userId;
works perfectly.
Any advice on how to make the first one function properly?
Appreciate your help!