List all built-in functions in javascript?

萝らか妹 提交于 2019-12-04 01:07:32

问题


Is there a way in js to list all the builtin functions and some info on their parameterlists? I couldn't really find anything about reflection to do this sort of thing

edit: The functions such as Math.sin are actually the ones I want to list, actually all built-in functions.


回答1:


Something like this, maybe?

for( var x in window) {
    if( window[x] instanceof Function) console.log(x);
}

This will list all native functions in the console (excluding one in native objects, such as Math.sin()).



来源:https://stackoverflow.com/questions/8693965/list-all-built-in-functions-in-javascript

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!