Skip to content

[js] 第498天 列举出JS的全局函数 #2825

Open
@haizhilin2013

Description

@haizhilin2013
Collaborator

第498天 列举出JS的全局函数

3+1官网

我也要出题

Activity

chuanxinwong

chuanxinwong commented on Aug 26, 2020

@chuanxinwong

for(var key in window){
if(typeof window[key] == 'function'){
console.log(key)
}
}

yjhtry

yjhtry commented on Aug 27, 2020

@yjhtry

const a = Object.getOwnPropertyNames(window); for (let i = 0; i < a.length; ++i) { if (typeof window[a[i]] === "function") { console.log(a[i]); } }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    jsJavaScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @haizhilin2013@chuanxinwong@yjhtry

        Issue actions

          [js] 第498天 列举出JS的全局函数 · Issue #2825 · haizlin/fe-interview