There is a variable called “_spPageContextinfo” available in all SharePoint pages, which provides some basic properties of the SharePoint site based on the current context.

I have given below some useful links available across the internet explains the properties with examples,

Using _spPageContextInfo to Determine the Current SharePoint Context in Script

But the above links explained the variable till SharePoint 2013, but SharePoint online updated with some properties to this _spPageContextinfo variable. Maybe this can be included in SharePoint 2016 also (yet to test in SP2016).

The new properties are added to _spPageContextInfo in SharePoint online are given below,

Name Example
env prod
hasManageWebPermissions true
isAppWeb false
isSiteAdmin true
updateFormDigestPageLoaded new Date(“2016-03-10T04:38:26.3177025Z”)