나는 간단한 개체가?목록 (계산) 프로토 타입 기능 예를 들어
계산 객체 'A'기능 : 당신은 프로토 타입에 Object.getOwnPropertyNames을 사용할 수 있습니다
var a = {};
var prototypeFunctions = 0;
var props = Object.getOwnPropertyNames(a.constructor.prototype);
for(var i=0; i<props.length; i++){
if(a.constructor.prototype[props[i]] instanceof Function){
prototypeFunctions++;
}
}
console.log("Number of object 'a' prototype functions: ", prototypeFunctions);
https://jsfiddle.net/adeneo/wLb5dyrj/ – adeneo