I create one object using Object.create
method, so Object.create
expects protoptype object as the first parameter and property decriptors are the second parameter.
var obj = Object.create({a:2},{b:{value:3}})
so, {a:2}
is the prototype of the obj. but if I am looking for prototype like obj.prototype
returns undefined
but if i checks using Object.getPrototypeOf(obj)
returning {a:2}
Can you tell me whats wrong here?
So, what is the first parameter in Object.create
?
Thanks