Skip to content
Advertisement

Category: Questions

Multiple buttons triggering the same modal component

I have an videos array, which in turn has objects of type Video (typing below). I need that when clicking on the button corresponding to a specific video, I can open only one modal with the information of the clicked video. Below is the component that renders the array of videos through a map, notice that inside the map, I

Unable to define this context in document.eventListener

I am implementing a scenario in which on clicking outside the drawer, i want to execute the saveChange action but somehow it is giving me the error that saveChange is not a function. I tried different ways to set the context but it is not working. Error : Answer this is because in your event listener, this refers to the

UrlFetchApp.fetch() skip on empty cell

I’ve written a script that gets an image url from a cell in Google Sheets and adds that image to a template in Google Docs. However, when the cell is empty, the script crashes: Really new to programming and would appreciate anyones help as to how to prevent the above code from crashing in the event a cell is empty

Coingecko links properties can’t be accessed

I’m using the following way to access a property on coingecko’s API: https://api.coingecko.com/api/v3/coins, this returns all crypto coins and their properties. While using the above link I can access the IDs of any object in the response. but if I’m using the next link: https://api.coingecko.com/api/v3/coins/bitcoin I’m still getting the ID as I can see in response, but I can’t access

promise not work as expected misunderstanding?

why the data is not logged and promise is logged in the first code? Answer This is only to demonstrate how you would get the data out of the promise (don’t do it this way): The second code is actually a shortened version of: This is the correct way of chaining Promises. As you can see, we return the Promise

Advertisement