Good day all.
I have this simple code:
totalTextArray = textForChatWithSeparators.split("#");
$.each(totalTextArray, function( index, value ) {
setTimeout(function(){console.log( value )},1000);
});
I expect to see in the console log, every second, the "value
" logged, but instead I see all the log coming out in one block, after the delay of 1 second.
what i'm doing wrong? I'm thinking of the fact that a function inside the function could lead to some buffering problem?