Get the App
SLTechnology News&Howtos  ›  Development  › 

How es6 uses aliases when deconstructing assignments

Shulou Source: shulou.com Published: 2022-06-01 04:10:10 10月02日 Update

This article mainly shows you "how es6 uses aliases when deconstructing assignments". The content is simple and clear. I hope it can help you solve your doubts. Let me lead you to study and learn this article "how es6 uses aliases when deconstructing assignments".

Use aliases when deconstructing assignments

Deconstructing assignment is a very popular JavaScript feature, but sometimes we prefer to refer to these properties with other names, so we can use aliases to do this:

Const obj = {x: 1}; / Grabs obj.x as {x} const {x} = obj; / / Grabs obj.x as {otherName} const {x: otherName} = obj; above is all the content of the article "how es6 uses aliases when deconstructing assignments". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Aliases content articles learning help functions names attributes understandability more organization knowledge editing industry information information channels channels research Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Shulou Tech Info Microsoft Huawei Docker