ऐसा लगता है कि निर्माता Function
है, लेकिन एक अन्य क्षेत्र से एक है।
आप इस कोड
console.log(Object.getOwnPropertyNames(setTimeout.constructor.prototype));
चलाते हैं तो आप ठेठ Function.prototype
तरीकों call
, apply
और bind
की तरह साथ एक सरणी मिलता है।
तो मैं यह कुछ हद तक क्या वेब ब्राउज़र में क्या होता है के अनुरूप है लगता है कि जब आप एक iframe से setTimeout
उधार:
var iframe = document.createElement('iframe');
document.body.appendChild(iframe);
var win = iframe.contentWindow;
console.log(win.setTimeout instanceof Function); // false
console.log(win.setTimeout instanceof win.Function); // true
निर्माता ** एक समारोह है **। 'Typeof setTimeout.constructor' टाइप करें' – undefined
मुझे इसकी * ए * फ़ंक्शन पता है, मैं पूछ रहा हूं कि कौन सा फ़ंक्शन –
नोड संस्करण 6.5.0 का उपयोग करके, 'Function.prototype.check = true; console.log (setTimeout.check); ' मेरे लिए प्रिंट प्रिंट – Sergeon