2022-02-03

Tech Programing

程式人小天地

Why is window.print() accessible but not print() in Javascript?

1 min read


Shouldn’t all global objects (i.e. window.someObject) be available at all times? Why does console.log(print) return undefined?

Is window.print not part of the global execution context? Or is print() locked inside of the window object?



Source link

資料來源:Stackoverflow

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *