codemarch
codemarch

@codemarch

9 تغريدة 9 قراءة Sep 10, 2022
Learn JavaScript Symbol
The Complete Guide:
Thread 🧵
The JavaScript ES6  introduced a new primitive data type called `Symbol`.
if you want to learn the concept of Data type, then you can go through it
🔗
Symbols are immutable (cannot be changed) and are unique.
For example-
Creating Symbol
You use the `Symbol()` function to create a `Symbol`.
For example -
Access Symbol Description
To access the description of a symbol, we use the `.` operator.
For example -
Add Symbol as an Object Key
You can add symbols as a key in an object using square brackets `[]`.
For example -
Symbols are not included in for...in Loop
The `for...in` loop does not iterate over Symbolic properties.
For example -
If you enjoyed reading this thread, please do the following:
1. Like the thread❤️
2. Retweet the first tweet.🔃
3. Follow me and enable notifications: ✅
@CodeMarch
Thank you for reading all the way through.
Download our free JavaScript Resources ebook Here:
codemarch.gumroad.com

جاري تحميل الاقتراحات...