Answer the question
In order to leave comments, you need to log in
What is the purpose of the outer loop in this code snippet?
Here is a cycle taken from the Vkontakte function for parsing emoticons
for (var i = 0; i < 2; i++) {
for (var code in regs) {
str = str.replace(regs[code], function(match, pre, smile, space) {
return (pre || '') + Emoji.getEmojiHTML(code)+(space || '');
});
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question