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,
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,