Creating and Using JavaScript Symbols

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ก.พ. 2020
  • In this tutorial we will look at how to create them, how to refer to them and for what purposes you might use a symbol that you have created.
    Would you like to help keep this channel going?
    allthingsjavascript.com/contri...
    Access to EVERY course for one low price: allthingsjavascript.teachable...
    Access to EVERY course (get 2 months free): www.skillshare.com/r/profile/...
    Courses offered on Udemy at a discount (access from my site): allthingsjavascript.com/course...
    For more resources on JavaScript:
    www.allthingsjavascript.com
    #javascript #AllThingsJavaScriptLLC

ความคิดเห็น • 29

  • @Kay_Drechsler
    @Kay_Drechsler 3 ปีที่แล้ว +1

    This explanation of symbols finally made click. Thanks!

  • @pandabuddy1655
    @pandabuddy1655 4 ปีที่แล้ว +1

    Mr, thank you Very much!

  • @rajeshsahu3073
    @rajeshsahu3073 4 ปีที่แล้ว +2

    Thank you so much for making a video on symbols.. I have only requested for symbols few weeks ago..

  • @rylaczero3740
    @rylaczero3740 4 ปีที่แล้ว +3

    I also remember reading that request in comments section.

  • @user-mi8yj3lc4i
    @user-mi8yj3lc4i ปีที่แล้ว

    Well explained. Thank you, sir.

  • @vladislavamarkova8379
    @vladislavamarkova8379 2 ปีที่แล้ว +1

    Perfect explanation! This is the video that helped me grasp the very concept of symbols and their main usage. Thank you!

  • @alaztetik2891
    @alaztetik2891 ปีที่แล้ว

    Great explanation and examples!
    Thank you Steve! 🚀

  • @davideugene7911
    @davideugene7911 4 ปีที่แล้ว +1

    Salut et merci pour TOUT :)

  • @wahibakamoulcode
    @wahibakamoulcode ปีที่แล้ว

    Thank you for this perfect video

  • @devins3711
    @devins3711 3 ปีที่แล้ว

    thank you so much for this thorough explanation! Liked & sub'd!

  • @user-zb5jp4ti1d
    @user-zb5jp4ti1d 4 ปีที่แล้ว

    thanks Steve for putting these together.. i have quick query... why do keys in objects/dictionaries(Python) need to be hashable. what does that mean... would you pls, when you can, create a video that speaks to this subject of hash maps. thank you once again.

  • @jareddunlop8411
    @jareddunlop8411 2 ปีที่แล้ว +1

    I like the pace of this. I am confused by the common variable name of 'symb1' at line 1 and [symb1] inside object on line 6. Do you first have to make a symbol before you can use it as an object property, or is it just coincidence you named them the same.
    In other words, could you have just the same done [dog] inside of the object, or do you have to explicitly create it first? ... const dog = Symbol();

    • @AllThingsJavaScript
      @AllThingsJavaScript  2 ปีที่แล้ว

      At line 1 I create a symbol and store it in symb1. Then I use that symbol inside the object as the key for that key/value pair.

  • @KASANITEJ
    @KASANITEJ 3 ปีที่แล้ว

    does uuid and symbols both are same?

    • @AllThingsJavaScript
      @AllThingsJavaScript  3 ปีที่แล้ว

      Not sure if symbols use uuid, but it is the same idea.

  • @chetanpl
    @chetanpl 3 ปีที่แล้ว

    Simple Q where we can use it?give me idea.

    • @AllThingsJavaScript
      @AllThingsJavaScript  3 ปีที่แล้ว

      You would use a symbol as the property for an object similar to how you use a string for that purpose.

    • @chetanpl
      @chetanpl 3 ปีที่แล้ว

      If interviwer ask me why you would use it give me an scanerio requirement.

  • @Deefamily1
    @Deefamily1 ปีที่แล้ว

    Okay I need more help I'm just teaching myself. I don't know if I'm asking the right question...by symbols. I mean a video explaining these ( ) and " " and [ ] and //.

    • @AllThingsJavaScript
      @AllThingsJavaScript  ปีที่แล้ว

      These can be used for different things in JavaScript. For example, () can be used to group, to invoke a function, to define a method. So it depends on where it is used in the code. [] also have multiple applications. I would approach it by learning how to do different things with JavaScript.

  • @CodingwithBasir
    @CodingwithBasir 4 ปีที่แล้ว

    What is your next coding video? Keep it up! Would you like to be TH-cam friends?

  • @TroenderTass
    @TroenderTass 4 ปีที่แล้ว +8

    thanks, i think this must be one of the most useless programming functions i've ever encountered

  • @lailanashim274
    @lailanashim274 4 ปีที่แล้ว +1

    Well, the point is: its worthless waste your time in it hahaha

  • @haciendadad
    @haciendadad 4 ปีที่แล้ว

    What a bad name for this useless function