How to iterate chat.say()
See original GitHub issueHi! This is a question more than an issue, but I was wondering how to iterate chat.say() while guaranteeing that it runs in the right order (i.e. synchronously?)
Clearly the following doesn’t work:
for (var i=0;i<arr.length;i++) {
chat.say(`${arr[i].something}`)
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
What is the easiest/best/most correct way to iterate through the ...
Benchmarks show String.charAt() is fastest for small strings, and using reflection to read the char array directly is fastest for large strings. –...
Read more >How to iterate string charcter by character in Python - YouTube
In this video we'll make simple example how to iterate string character by character an print these characters to the string.
Read more >Iterate Over the Characters of a String in Java - GeeksforGeeks
In this approach, we use the CharacterIterator methods current() to get the current character and next() to move forward by one position.
Read more >How to Iterate Through a Dictionary in Python
In this step-by-step tutorial, you'll take a deep dive into how to iterate through a dictionary in Python. Dictionaries are a fundamental data...
Read more >Loops in Ruby - performing repeated operations on a data set
Loops and iterators in Ruby are a great way to perform repeated operations on a data set. Step by step tutorial for the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @danielnjoo,
chat.say()
returns a promise, so maybe you can try doing something like this:I’m not 100% sure that would work, but it could take you in the right direction.
This works thanks! – clearly I have to brush up on my understanding promises