JavaScript. What is a symbol?

Publié le: 22 mai 2023
sur la chaîne: Latte And Code
2,845
191

Symbols in JavaScript are a unique and immutable primitive type. Discover how to work with them in this video.

👨🏼‍💻 Support me on Patreon:   / latteandcode  
💛 The folks at Garaje de Ideas sponsor Latte and Code and are looking for talent: http://bit.ly/garaje-tech-talento
☕️ Buy me a coffee: https://www.buymeacoffee.com/latteand...

Learn all about the Symbol object in JavaScript in this video. We'll explore how Symbol objects work, their use as unique object properties, the static method Symbol.for, and how to create custom iterable objects with Symbol.iterator.

[00:00] Introduction
[01:15] What is a Symbol?

[00:00] Introduction [03:10] Defining Object Properties with Symbols
[05:40] Object.getOwnPropertySymbols
[07:00] Symbol.for()
[10:53] Symbol.iterator

Symbol objects are unique, immutable primitive data types in JavaScript that can be used as object properties with special characteristics. Discover how these properties are not enumerable in for...in loops and how to use Object.getOwnPropertySymbols() to access them.

You'll also learn how the static Symbol.for method searches for existing symbols in a global symbol registry or creates a new one if it's not found. Additionally, I'll show you how to use Symbol.iterator to create custom iterable objects following the iteration protocol.

This video is perfect for developers looking to improve their JavaScript skills and learn how to work with Symbol objects.


Sur cette page du site, vous pouvez voir la vidéo en ligne JavaScript. What is a symbol? durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Latte And Code 22 mai 2023, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 2,845 fois et il a aimé 191 téléspectateurs. Bon visionnage!