Answer the question
In order to leave comments, you need to log in
Javascript code refactoring?
Tell me how you can improve the following code (coffeescript)
text = "Отправка"
textanim = setInterval ()->
if text.length > 10
text = text.slice(0,8)
else
text+="."
subBtn.text(text)
,500
var text, textanim;
text = "Отправка";
textanim = setInterval(function() {
if (text.length > 10) {
text = text.slice(0, 8);
} else {
text += ".";
}
return subBtn.text(text);
}, 500);
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