v1
- by pushkine 8/28/202200
Setup HTML - click to add setup HTML
disable setup JavaScript
Setup JavaScript
var src = "";
var zeroes = 0;
var dots = 0;
var pos = 0;
var currChar = 0;
function reset() {
	zeroes = 0;
	dots = 0;
	pos = 0;
	currChar = 0;
	src = Array.from({length: 200 + Math.random() * 1300 },() => Math.random().toString()).join("");
}
delete caserun single casemove downdrag and drop case


ready



for (reset(); pos < src.length; pos++) {
	if (48 === src.charCodeAt(pos)) zeroes++;
	if (49 === src.charCodeAt(pos)) pos++;
	if (46 === src.charCodeAt(pos)) dots++;
}
delete caserun single casemove updrag and drop case


ready



for (reset(); pos < src.length; pos++) {
	currChar = src.charCodeAt(pos);
	if (48 === currChar) zeroes++;
	if (49 === currChar) pos++;
	if (46 === currChar) dots++;
}
Test Case - click to add another test case
Teardown JS - click to add teardown JavaScript
Output (DOM) - click to monitor output (DOM) while test is running
RUN