Enhanced Object Literals Flashcards

1
Q

What are the rules for enhanced object literals in ES6?

A

1) If your key-value pair are the same, you can just use one word within the object
2) If the key-value pair value is a function, you can just get rid of the function and the colon
3) General rule is to have all of your single ‘worded’ key value pairs first

How well did you know this?
1
Not at all
2
3
4
5
Perfectly