In the sample above, there is an object named person and the person object has 3 keys (fullName, personality and age)...
-age is a property so it can directly be accessed as person.age
-personality is a method. It stores a function. So it can be accessed as person.personality()
-fullName on the other hand also contains a function but the function definition is followed by a pair of parentheses "()". The function will call itself and then return a value. The value is stored in the fullName key. So you can write person.fullName not person.fullName()
The fullName key can then be accessed as a property. Some limitations apply.
https://abs.twimg.com/emoji/v2/... draggable="false" alt="👉" title="Rückhand Zeigefinger nach rechts" aria-label="Emoji: Rückhand Zeigefinger nach rechts"> The & #39;this& #39; keyword is not available in it.
https://abs.twimg.com/emoji/v2/... draggable="false" alt="👉" title="Rückhand Zeigefinger nach rechts" aria-label="Emoji: Rückhand Zeigefinger nach rechts"> The function should return a value to be stored in the key so the key can be accessed as a property.
Kindly follow @AbdulramonJemil if you haven& #39;t. Thanks
I used array destructuring on line 1 in the code snippet...
If you don& #39;t know what that is, read this thread... https://twitter.com/AbdulramonJemil/status/1387993754498383875?s=19">https://twitter.com/Abdulramo...
You can follow @AbdulramonJemil.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled: