Nice one. But for me as a machine language programmer a Stack is where you Push (add an entry) and Pop (remove an entry) Essentially a Stack looks like an Array but it behaves differently. A stack also implements a "Label" for the basic but forbidden "GoTo" and derived mechanisms like "Break" and "Try ... Catch" which are "GoTo's in disguise". It's also the base for recursion where we add frames for each iteration,,,
Everything is good except for a last example with object slice. I think you should've mutated score before object comparison between podium and runnerUps, so it would be easier to understand that something went wrong after we get true. Anyway, thank you for a video, cheers!
hi !! please, 3:48 why updatedScoreCount returns the lenght of the array 6? 1/ we didn't used array.lenght 2/ I thought updatedScoreCount would return a copy of the 1st array thanks a lot
updatedScoreCount doesn't return anything. It's just the variable where the returned value of the unshift method is stored. Quote from the docs: "The unshift() method adds one or more elements to the beginning of an array and returns the new length of the array."
"getting an index of an element and then finding the element itself by that index". this involves in double operations. why not use "find" method and we are done ?
1. 0:04 - findIndex
2. 2:12 - unshift
3. 4:24 - map
4. 7:10 - entries
5. 9:11 - slice
Nice one. But for me as a machine language programmer a Stack is where you Push (add an entry) and Pop (remove an entry) Essentially a Stack looks like an Array but it behaves differently. A stack also implements a "Label" for the basic but forbidden "GoTo" and derived mechanisms like "Break" and "Try ... Catch" which are "GoTo's in disguise". It's also the base for recursion where we add frames for each iteration,,,
Quite refreshing. I learned several useful array methods from your old javascript series.
Everything is good except for a last example with object slice. I think you should've mutated score before object comparison between podium and runnerUps, so it would be easier to understand that something went wrong after we get true. Anyway, thank you for a video, cheers!
Perfect video!
hi !! please, 3:48 why updatedScoreCount returns the lenght of the array 6?
1/ we didn't used array.lenght
2/ I thought updatedScoreCount would return a copy of the 1st array
thanks a lot
updatedScoreCount doesn't return anything. It's just the variable where the returned value of the unshift method is stored. Quote from the docs:
"The unshift() method adds one or more elements to the beginning of an array and returns the new length of the array."
@@christian-schubert thanks a lot THANK YOU for your time and response
👌👌👌🙏🙏🙏🖖🖖🖖🖖
"getting an index of an element and then finding the element itself by that index". this involves in double operations. why not use "find" method and we are done ?
Why do you need to hide your terminal at 1:45? Everyone knows that male at least have 1 sussy folder on their pc. No need to hide man
In vsCode?
@@edwardsicily yea