SOURCE

'use strict'
const foo = {}
console.log(foo)
foo.prop = '123'
console.log(foo.prop)

const obj = Object.freeze({})
// obj.prop=123
console.log(obj.prop)

if(typeof global !== 'undefined'){
    console.log('global')
}

if(typeof window != 'undefined'){
    console.log('window')
}

console.log(globalThis)

console 命令行工具 X clear

                    
>
console