Loading topic
key: value entries inside. This chapter covers how a literal is written and evaluated, which va5 min readobj.name) and bracket notation (obj["name"]). They look interchangeable, and in simple cases they are. They differ in what you can write between the dot or the brackets, and in when the key is decided. Most bugs in this area come fr6 min readkey: value pairs and that keys are strings or symbols. This chapter covers two pieces of literal syntax that make objects shorter to write and let you build keys at runtime. Shorthand properties let you leave out the key when it match5 min read"use strict"; so that 5 min readdelete. It also assumes you know that keys can be strings or symbols. You should be comfortable with arrays and for...of loops. Two topics come up briefly here and get their own chapters5 min readundefined. Destructuring builds directly on those ideas. It is a compact syntax for readin5 min readObject.keys and Object.entries, which the previous chapter covered. Here you will see why assigning an object never copies it, how5 min readObject.keys and for...in, and the prototype chain covered in earlier chapters. You should also know the difference between strict mode and sloppy mode, because 5 min readthis is bound in methods, and what property descriptors such as writable and enumerable mean. It also uses Object.create and the prototype chain from earlier chapters.5 min read