This is REALLY instructive and i'm trying to use it as a model for some code that i am writing, but i'm coming up short in applying it. Can anyone address whether at the 11:56 mark that "whiskey" value is a reference to something or is it a name pulled out of thin air? Could the value of the variable have been 'bob' (for example) at line 89? I'm working thru an example (using my own objects and data of course) and when i reference the variable name in my 'return `` statements, i keep getting 'Undefined'. In the example, the author has declared a type above on line 46 called 'whiskey' and i'm wondering if that object is related to the map or if those variables just have coincindentally been named the same thing.
Inside the Array map( ) method on line 89, `whiskey` represents the next item from the array request.result. So, on line 90 we are referring to that object. Line 88 writes out the object to the console. You should be able to see the structure of the object and the result array, if there was any data in your database. If the structure of your data is different then the result in the console will be different. You will have to adjust your map( ) function accordingly. The line 46 `whiskey` variable is scoped inside the submit function. It is a template for a new object being added to the data store.
Fantastic video. It was exactly what I needed. Nice Job!!!
Thanks! Great explanation.
This is REALLY instructive and i'm trying to use it as a model for some code that i am writing, but i'm coming up short in applying it. Can anyone address whether at the 11:56 mark that "whiskey" value is a reference to something or is it a name pulled out of thin air? Could the value of the variable have been 'bob' (for example) at line 89? I'm working thru an example (using my own objects and data of course) and when i reference the variable name in my 'return `` statements, i keep getting 'Undefined'. In the example, the author has declared a type above on line 46 called 'whiskey' and i'm wondering if that object is related to the map or if those variables just have coincindentally been named the same thing.
I can't seem to get my values out of the request.result return object, i can't figure it out.
Inside the Array map( ) method on line 89, `whiskey` represents the next item from the array request.result.
So, on line 90 we are referring to that object.
Line 88 writes out the object to the console. You should be able to see the structure of the object and the result array, if there was any data in your database. If the structure of your data is different then the result in the console will be different. You will have to adjust your map( ) function accordingly.
The line 46 `whiskey` variable is scoped inside the submit function. It is a template for a new object being added to the data store.
thanks professor
Dude you fucking saved my ass, the docs were not helpful with fetching
line 103 li.getAttribute('data-key') returns null for me.
instead I used: let id = li.dataset.key
The two commands are equivalent and both supported everywhere so there must be something else going on leading to the issue.
I have the same problem and I don't know how to solve it.
Could you share your code, just that section?
@@SteveGriffith-Prof3ssorSt3v3 It will be that you can help me I don't know where the problem comes from