You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function create(proto, propertyObject=undefined){
if(typeof proto !== 'object' && typeof proto !== 'function') {
throw new TypeError('Object prototype may only be an Object or null')
}
if(propertyObject === null) {
throw new TypeError('Cannot convert undefined or null to object')
}
function F(){}
F.prototype = proto
const obj = new F()
if(propertyObject != undefined){
Object.defineProperties(obj, propertyObject)
}
if(proto === null){
obj.__proto__ = null
}
return obj
}
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: