So I am very confused by sync/async function, I’m trying to get a sync function to print a message on a chat twitch with a random viewers username in it. I succeed in retrieving the total users’ list but I am stuck due to the async nature of the fetch function I search in a lot of tutorial and everybody return data in a console.log but I want to put this data in another function how can I do it?
It’s been 10 days and nobody responded is my question unclear or nobody know the answer? I’m really stuck on this project please help me
Hi there - if you share your project name so we can see the code you’re trying, that would help us help you!
My project is name pecheur-bot
Thanks for sharing! I am not sure specifically in the code that you’re trying to do this in but if all you’re trying to do is call a function with the data instead of console log, you can replace the console log of data with the function call with the data as the argument. If you’re trying this and its not working, let us know the line in your code where this is happening.