7 MUST KNOW JavaScript Tips and Tricks

Поділитися
Вставка
  • Опубліковано 9 лис 2024

КОМЕНТАРІ • 41

  • @karimnassir5207
    @karimnassir5207 2 роки тому +1

    Best channel in youtube

  • @robwatson826
    @robwatson826 2 роки тому

    Object destructiring is the best thing since sliced bread. Love a bit of `let { prop1, prop2 } = obj`

  • @edwinroman30
    @edwinroman30 2 роки тому

    Thanks for these tricks, have a great day!

  • @abubalo
    @abubalo 2 роки тому +1

    Thanks for these useful tips, Dom.

  • @minnuss
    @minnuss 2 роки тому +2

    Great content !

  • @timelesscode323
    @timelesscode323 2 роки тому +1

    Thanks for great tips

  • @BenjaminAster
    @BenjaminAster 2 роки тому +9

    1:06 why don't you just use structuredClone()? Why are you abusing JSON.parse(JSON.stringify()) here?

    • @BenjaminAster
      @BenjaminAster 2 роки тому +1

      @@ИванРыженков-к1ф Я знаю, что я супер крутой, спасибо!

    • @edwinroman30
      @edwinroman30 2 роки тому

      The structuredClone() method is not supported by some web browsers as Chrome, Edge... But at lease work in node 17 :)

    • @edwinroman30
      @edwinroman30 2 роки тому

      Thanks to the video and your comment, I learnt two ways 🙌

    • @dcode-software
      @dcode-software  2 роки тому +6

      You're right, structured clone may be the better alternative if it's supported on the environment users are on, but in many cases people are targetting the browser which this method isn't fully supported on as of right now.

  • @wisdomelue
    @wisdomelue 2 роки тому

    very helpful thank you

  • @rachidb9624
    @rachidb9624 2 роки тому

    Thanks mate !

  • @DigitalFox-tutorials
    @DigitalFox-tutorials 2 роки тому +1

    Useful video, thanks.

  • @s21ekosn8
    @s21ekosn8 2 роки тому

    Thank U So Much dCode 👍

  • @VforVanish
    @VforVanish 2 роки тому +1

    Thank you, this was really usefull!

  • @longingbydesign
    @longingbydesign 2 роки тому +2

    I want those 9 minutes back

  • @Marcieur
    @Marcieur 2 роки тому +1

    It is also possible to use the new Set trick with spreading as in const noDuplicates = [...new Set(duplicates)];

  • @re.liable
    @re.liable 2 роки тому +2

    Null coalescing instead of `||`
    The self-invoking functions are called IIFEs I think

  • @BenjaminAster
    @BenjaminAster 2 роки тому +5

    3:18 Use ??, not || here because if the value is zero, false or an empty string you wouldn't want it to fall back to the default.

  • @kabitamudel1011
    @kabitamudel1011 2 роки тому +1

    𝙉𝙞𝙘𝙚 𝙩𝙞𝙥𝙨

  • @beinyourguard
    @beinyourguard 2 роки тому

    very good

  • @augischadiegils.5109
    @augischadiegils.5109 2 роки тому

    ❤️❤️❤️❤️

  • @BenjaminAster
    @BenjaminAster 2 роки тому +3

    0:05 just use a real function () {} (not an arrow function) here, then you can use the "this" keyword. So you can just say this.className.

  • @ijajulislam7223
    @ijajulislam7223 2 роки тому

    sir plz make react tutorial

  • @prakashdsouza7286
    @prakashdsouza7286 2 роки тому +1

    Hi bro

  • @TheBorninmotion
    @TheBorninmotion 2 роки тому

    goood!

  • @iamvishalnishad
    @iamvishalnishad 2 роки тому

    👍❤️

  • @mohammedabdulaziz3658
    @mohammedabdulaziz3658 2 роки тому

    hello sir, your udemy link is not working

    • @dcode-software
      @dcode-software  2 роки тому +1

      Hey, yes not at the moment but hopefully soon I'll have some more courses up, thanks!

  • @goljivines7356
    @goljivines7356 2 роки тому +1

    turn to javascript frameworks like react and node js

    • @BenjaminAster
      @BenjaminAster 2 роки тому +5

      You're either trolling or don't get the point of dcode's content.

    • @minnuss
      @minnuss 2 роки тому +2

      React is a js library and Node js is a runtime environment 😉

  • @MrBrady95
    @MrBrady95 10 місяців тому

    What makes the first example a "must know?" It's interesting but doesn't seem very practical, seems like de-structuring for it's own sake. Much easier and more common to use the (e) instead.

  • @ts3798
    @ts3798 2 роки тому

    Are you really 38?