How es6 creates an empty object
This article is about how es6 creates an empty object. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Create an empty object
Sometimes we need to create a pure object that does not contain any prototype chains and so on. Generally, the most direct way to create an empty object is through the literal {}, but there is still a proto attribute in this object to point to Object.prototype and so on.
Let dict = Object.create (null); dict.__proto__ = = "undefined" Thank you for reading! This is the end of the article on "how to create an empty object in es6". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!