the output results of the two types are not the same
there is data in the obj output from the first picture, but it is undefined when it is obtained.
the output results of the two types are not the same
there is data in the obj output from the first picture, but it is undefined when it is obtained.
get the value once when you output from the console
when you click the drop-down to expand more, it will get the value again
"i"
console
console.log()
JavaScript
Synchronize next question
console is asynchronous. For more information, please take a look at this issue, which was accidentally discovered by a memory leak
.https://github.com/nodejs/node/issues/2970
highlight console output is buffered and async.
but when it comes back to the topic, this place is really because of the citation problem
the first picture when you print obj.aaa, the object obj does not have the attribute of aaa. Of course, it is undefined. After you assign a value to obj.aaa='aaa', you can print out aaa
.Previous: The website system opens the home page and takes up too much memory.
Next: Layer.js is referenced in vue but cannot be displayed on the page
related files babel.config.js module.exports = { presets: [ @vue app , [ "env", { "modules": false, "useBuiltIns": "entry" } ], "stage-0" ], ...