Тёмный

Intro to JavaScript Symbols 

Steve Griffith - Prof3ssorSt3v3
Подписаться 103 тыс.
Просмотров 15 тыс.
50% 1

Опубликовано:

 

31 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 56   
@TS-rw5hw
@TS-rw5hw 3 года назад
The days that I haven't found this channel is wasted.
@dpradeepc
@dpradeepc 5 лет назад
I came here after my paid videos failed to explain me clearly what symbols are, it took me exactly one minute and thirty seconds to understand symbols after starting this video...thanks to youtube for placing the top-notch content on top
@abhijeethycinth
@abhijeethycinth 5 лет назад
This explanation touches almost every aspect of Symbols. Thank you very much. One of the best explanations out there.
@arunjaiswal8650
@arunjaiswal8650 Год назад
It's really an amazing experience to watch this video about symbols
@skan90
@skan90 2 года назад
Thank you, I had to exit a LinkedIn Learning course and come here to understand it. The content in your channel is amazing, just got yourself a new subscriber. Love from Brazil! ♥
@nitsanbh
@nitsanbh 4 года назад
Your voice cures my soul
@pk_2cents696
@pk_2cents696 6 лет назад
Thank you so much. I could not find the proper explanation for symbols anywhere and got here ,you explained it pretty well
@_isaac_muniz_
@_isaac_muniz_ 3 года назад
It is the best video I found about Symbols! Nice work!
@ahmedkhalid-ld1ex
@ahmedkhalid-ld1ex 2 года назад
Best explanation i could find so far, thanks a lot for your effort ♥️
@Videosuser
@Videosuser 2 года назад
Thank you very much. One of the best explanations out there. 2
@davidascholer
@davidascholer 4 года назад
Best video on Symbols 👍
@chesterxp508
@chesterxp508 3 года назад
Another very cool tutorial!
@rotrose7531
@rotrose7531 4 года назад
Thank you for another excellent and well-explained tutorial.
@rungekutta5732
@rungekutta5732 4 года назад
I was confused with the use of Symbols and all of its methods and properties but this quick video helped me to understand what Symbol is. Explained very well. If you can please upload one more video on Symbols explaining its properties and methods? All the stuffs on mozilla reference seems hard to grasp for me. Thanks.
@rakesh.rankawat
@rakesh.rankawat 4 года назад
You solve my whole pain... Thanks man!
@norbertolkowski6285
@norbertolkowski6285 8 месяцев назад
Good video :D. Thank you so much
@igoraleks9282
@igoraleks9282 2 года назад
A very clear explanation of what symbols are but why do we need Symbols?
@farhan787
@farhan787 5 лет назад
Thanks a ton Steve, it was really helpful.
@yinonelbaz5309
@yinonelbaz5309 3 года назад
This tutorial covers what exactly Symbols are and how you can manage them.
@pratham5746
@pratham5746 4 года назад
Thank u so much I learned the symbol by 1 vid
@divya101993
@divya101993 5 лет назад
Symbols well explained, thanks for the video !!
@becauseistand
@becauseistand 6 лет назад
brilliant explanation. thanks a lot!
@CodeProps
@CodeProps 5 лет назад
I still don't understand what practical uses for this, need to re-watch I guess.
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 5 лет назад
Here is the MDN reference developer.mozilla.org/en-US/docs/Glossary/Symbol They are simply there if you need to have a unique property key for some object. Creating a custom iterator is the most common use.
@warrent8590
@warrent8590 5 лет назад
Awesome,thank you
@Retrofire-47
@Retrofire-47 Год назад
Similar to the `Optional chaining '?.'` operator, accessor, thing, finding an actual _use_ for the Symbol data type eludes me completely
@SteveGriffith-Prof3ssorSt3v3
nullish operators: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-uJ9ylqqDuTI.html ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-onVLVOP7-gI.html Example using Symbol to build a custom iterator - ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-OC9D9REnXPw.html
@pinkleprechaun52
@pinkleprechaun52 2 года назад
What is the purpose of the symbols not showing in the for loop? Btw, thank you for the great explanation.
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 2 года назад
When you do a for...in loop you are looping through all the key Strings for an object. Symbols are not Strings. So, they do not show up in the list. This is a way that you can create properties inside of an object that are sort-of hidden. If you know the key for the symbol then you can retrieve the Symbol and then access the property of the Object, but it won't appear in the loop. It means you can create unique properties on every object instance that will never conflict with or be overwritten by other properties. There are some built-in properties that use Symbols as their property names. Symbol.iterator is an example - ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-OC9D9REnXPw.html . It does not appear when you do a for loop.
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 2 года назад
And ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-NoUPIQobeLw.html
@pinkleprechaun52
@pinkleprechaun52 2 года назад
@@SteveGriffith-Prof3ssorSt3v3 Thank you so much for answering my question. I love your channel and you are a teacher to us all. You taught me javascript and I am forever grateful for your teachings :)
@mattmidtvedt2555
@mattmidtvedt2555 4 года назад
Quick question from a Java programmer moving over to learning some JavaScript. Could you explain why console.log() is accessible written just as log()? Thanks in advance!
@jaymandell6034
@jaymandell6034 4 года назад
const log = console.log;
@sourishdutta9600
@sourishdutta9600 5 лет назад
Hi Sir, Thank you for what you have explained is completely wow but can you please explain me the use cases of symbols and about this meta programming concept a little bit. One more thing can you please explain about the proxy in es6. Thanks in advance.
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 5 лет назад
You can use Symbols as unique ids within objects but the most common thing for them is creating custom iterators. Please add the proxy request to my tutorial request video.
@sourishdutta9600
@sourishdutta9600 5 лет назад
@@SteveGriffith-Prof3ssorSt3v3 yes thank you.
@eswararaoravada2895
@eswararaoravada2895 5 лет назад
Any use-cases.where it is useful. except iterators & generators
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 5 лет назад
Iterators are definitely the most common. They can be used anywhere you absolutely must have a unique property key. You will also see them in places where you need reference to a unique internal value like with Regular Expressions and the match value. Eg: developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@match
@Luxcium
@Luxcium 5 лет назад
Will you do (or have you done) a tutorial on Symbol.toPrimitive
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 5 лет назад
I haven't yet but I have added it to my list of videos to make.
@StevenVachon
@StevenVachon 5 лет назад
But why would we want unique identifiers for object properties?
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 5 лет назад
When something is being added dynamically to an Object and you have no idea what property names already exist. You need something that is guaranteed to be unique.
@Cognitoman
@Cognitoman 6 лет назад
Pretty cool mean, could you use these in react as a unique identifier for JSX elements ?
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 6 лет назад
If you are referring to the key attribute that you add to React components, then sort of... This code runs key={new Symbol()} But it defeats the purpose of having a unique id that you can refer back to later on to target a component. You should use a unique value that exists in the data.
@saishdesai408
@saishdesai408 4 года назад
what is $ sign in javascript??
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 4 года назад
$ is just one of the possible characters that you can use for a variable name in JavaScript. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-ILx2rvQDLDk.html
@froggyy
@froggyy 3 года назад
What is the point of symbol
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 3 года назад
When you need something that is guaranteed to be a unique reference to a property or a method, use a Symbol as the reference. They don't show up when you use for...in or for...of to loop through the properties, but they still exist. Built-in properties and methods sometimes use them too.
@johnconnor9787
@johnconnor9787 3 года назад
Could you show a real life implementation of this
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 3 года назад
I'm using one in this video - ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-NoUPIQobeLw.html
@ajunwaowoicho1723
@ajunwaowoicho1723 Год назад
U tutor well, however ur display isn't the kind that would catch the fancy of a novice. Tips: u keep to many contents on ur screen per time, u should try dark theme and coloured text, and a bolder screen helps too. Thank u.
@SteveGriffith-Prof3ssorSt3v3
My content has changed since I started making tutorials 5 years ago
@ajunwaowoicho1723
@ajunwaowoicho1723 Год назад
@@SteveGriffith-Prof3ssorSt3v3 ok, thanks proff. I am actually a beginner so I thought to let u know how we see things from where we're standing
@mervinmarias9283
@mervinmarias9283 Год назад
You could literally copy another youtubers video that I've watched word for word and I would still understand your lesson better. It would now make sense.
@imtanuki4106
@imtanuki4106 Год назад
everything you'd ever want to know about symbols...except why and how to use them, in an app.
@SteveGriffith-Prof3ssorSt3v3
How depends on the app. Why - when you need to add a property with a unique name as to avoid naming conflicts with properties that already exist and ones that will be added in the future.
Далее
Iterable vs Enumerable in JavaScript
9:15
Просмотров 21 тыс.
The Complete Guide to JS Symbols ES6
12:18
Просмотров 54 тыс.
A Monster is Chasing Me! 😭
00:19
Просмотров 1,6 млн
СОБАКА И  ТРИ ТАБАЛАПКИ Ч.2 #shorts
00:33
Visually Understanding JavaScript Prototypes
14:58
Просмотров 55 тыс.
5 JavaScript Concepts You HAVE TO KNOW
9:38
Просмотров 1,4 млн
JavaScript Proxies
22:54
Просмотров 11 тыс.
Creating and Using JavaScript Symbols
15:17
Просмотров 6 тыс.
ES6 Iterator & Generator Fundamentals
18:18
Просмотров 31 тыс.
JavaScript - Reference vs Primitive Values/ Types
20:56
The Power of JS Generators by Anjana Vakil
36:10
Просмотров 168 тыс.
JavaScript Classes Tutorial
1:01:29
Просмотров 290 тыс.