You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to the prefix increment of i in the for-loop, I expect a TypeError because cannot read "0" of undefined no matter is the array length. I added a log and the i variable seems incremented after a loop.
Do we need a for-loop?
I think what we need is simply read the last entry of the results array. AFAIK, the resultIndex variable is the index of the last result received. So the for-loop do 1 loop on the last entry right?
Thanks to help me to understand how it's working. 👨🎓
The text was updated successfully, but these errors were encountered:
There is 2 questions I would like to ask about this snippet.
voice-elements/src/voice-recognition.html
Lines 66 to 69 in d01df66
Why the
voice-recognition
element is working?Due to the prefix increment of
i
in the for-loop, I expect aTypeError
because cannot read "0" ofundefined
no matter is the array length. I added a log and thei
variable seems incremented after a loop.Do we need a for-loop?
I think what we need is simply read the last entry of the results array. AFAIK, the
resultIndex
variable is the index of the last result received. So the for-loop do 1 loop on the last entry right?Thanks to help me to understand how it's working. 👨🎓
The text was updated successfully, but these errors were encountered: