JavaScript Tip: Working with Data in Objects

Поделиться
HTML-код
  • Опубликовано: 25 окт 2024

Комментарии • 24

  • @carlaun77
    @carlaun77 Год назад +1

    Very good explanation!

  • @DavidTheDeveloper
    @DavidTheDeveloper 4 года назад +3

    No fluff, just straight to the point.

  • @ChrisTian-ox5nr
    @ChrisTian-ox5nr 4 года назад +1

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

  • @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?

  • @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 лет назад

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

  • @greggfineguitar
    @greggfineguitar 6 лет назад +1

    Excellent Vids!

  • @milkyplay6995
    @milkyplay6995 5 лет назад

    please keep it up, I like your stuff 👍

  • @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}] ?

  • @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?

  • @MuhammadAdnan-gx6rd
    @MuhammadAdnan-gx6rd 6 лет назад

    Keep It Up

  • @ilhomhuja
    @ilhomhuja 6 лет назад +1

    Xcellente