Комментарии:
However, there's a small issue in your implementation. You're iterating over each character of the text and then counting the occurrences of that character in the entire text on each iteration. This approach doesn't accurately check for consecutive occurrences. function abscenceOfThreeConsecutiveCharacters(text) {
for (let i = 0; i < text.length - 2; i++) {
if (text[i] === text[i + 1] && text[i] === text[i + 2]) {
return false;
}
}
return true;
}
You are literally the reason my programming assignment will be at least partially correct. Otherwise, I am clueless with js lol
ОтветитьI learn more from one of your 30 minute videos' than in a whole 3 term course in grade 8. All hail the KING: Dcode!
ОтветитьIt was very helpful, thanks!😊
ОтветитьI have rarely encountered labeled statements ( or even the continue keyword ) in any of the thousands of JavaScript tutorials out there ... thanks for your effort !
ОтветитьWould love to see a word counter that can be attached to both a regular input and textarea. And by attached I mean embedded in the field, not below it. Inputs are easy, but I am struggling with a textarea, especially when scrollbars become visible.
ОтветитьYou can't be called dumb you are very smart!
ОтветитьGreat content and explanation sir as per usual
ОтветитьThanks a bunch! 🙏 Learned a lot.
ОтветитьRemarks: use css variables to make some values consistent in css
better to use ?? where it is possible instead ||