D
D
Dmitry2210602017-09-02 12:52:17
JavaScript
Dmitry221060, 2017-09-02 12:52:17

How to get object value by key after __proto__?

There is an object - https://i.paste.pics/a354e443bb05bc7ad6c92117edc59...
You need to get the value of , but .onClick[""] does not work. Moreover, if you add your key, , then it is placed at the top and called without problems - https://i.paste.pics/f7775b5973963e2173ebd3e525446...
Question - how do I call ?
UPD
As I understand it, this is not a key, it is not overwritten. Apparently, this is something React. But I can't find a variable with it. Just .scope() doesn't work either.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Di Ma, 2017-09-02
@Dmitry221060

Each execution of the function stores all variables in a special object codenamed , which cannot be obtained explicitly, but it exists.
Each call to var... - just creates a new property of this object, and any mention of a variable is first looked for in the properties of this object.

Something went wrong with you..
And to access the prototype properties, use:
// Чтение. Возвращает obj.__proto__ 
Object.getPrototypeOf(obj);  

// Запись. Устанавливает obj.__proto__ = proto 
Object.setPrototypeOf(obj, proto);

V
VoidVolker, 2017-09-02
@VoidVolker

Scope - translated as "Scope", this is not a property of the object.
https://www.w3schools.com/js/js_scope.asp
https://leonid.shevtsov.me/post/javascript-variabl...

A
Alexander, 2017-09-02
@boratsagdiev

This property is added by dev tools and apparently is not available for programmatic call from js.
See https://stackoverflow.com/questions/41146373/acces...
(There is a question about the adjacent )

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question