JavaScript Tip: Working with Data in Objects

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 ธ.ค. 2024

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

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

    No fluff, just straight to the point.

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

    Thanks again Steve! Can you please explain how you got the value using the val, as I don't understand how"val" didn't contain the key instead? 4:19

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

      Since val contains the key then using students[key] is like using students.keyname. Since the variable contains the key, we use the square brackets to access the value of the variable. Does that help?

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

    Very good explanation!

  • @ChrisTian-ox5nr
    @ChrisTian-ox5nr 4 ปีที่แล้ว +1

    This was extremely helpful!! Thanks a bunch Steve!!

  • @seenuvasanv
    @seenuvasanv 6 ปีที่แล้ว +2

    Thanks for the awesome tutorial

  • @sumantkanala
    @sumantkanala 6 ปีที่แล้ว +1

    yeah, Here comes the tricky parts: dealing with objects, arrays. Well explained. Some of the new ECMA features are really helpful! Array.from is one such new API.

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

    My struggle is just* beyond this, but not far.
    Like finding the second lowest grade and returning the student email.
    Or if two students have the same grade, ignore the student with the email that’d come first in the alphabet.
    It’s starts to mess with my head when I don’t have a reference Val like how w/ arrays.
    Ex: var lowest = arr[0],
    If arr[i] < lowest,
    Lowest = arr[i].
    I struggle w/ examples where you don’t have access to a properties dot notation, & obj[key] will update your ‘lowest’ var every loop.

  • @borodiny
    @borodiny 6 ปีที่แล้ว

    Спасибо, интересные методы работы с объектами.

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

    How can we do sum of uniques items in object array [ {id :1,chat: 2},{id :1, chat:3}] result should be [{ id:1, chat : 5}] ?

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

      I will have to add that to the list of possible tutorials.

  • @HugoNav9
    @HugoNav9 6 ปีที่แล้ว

    Is it possible to use .entries in a way similar to an associative array?

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

      Here is the way I would think of it: the JavaScript object is really an associative array. These methods make it easier to work with that data as you would expect with an array. Something else to be aware is that in ES6 a Maps collection was added that might fit your needs.

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

    Line 20... should not we use let before Scores?

  • @greggfineguitar
    @greggfineguitar 6 ปีที่แล้ว +1

    Excellent Vids!

  • @milkyplay6995
    @milkyplay6995 5 ปีที่แล้ว

    please keep it up, I like your stuff 👍

  • @ilhomhuja
    @ilhomhuja 6 ปีที่แล้ว +1

    Xcellente

  • @MuhammadAdnan-gx6rd
    @MuhammadAdnan-gx6rd 6 ปีที่แล้ว

    Keep It Up