This just spits up: "I can sw"
"use strict";
var startMessage = "I can swear. I can joke.";
var endMessage = "";
for (var i = 0; i < startMessage.length; i++) {
if (startMessage[i] == "e") {
i = startMessage.length;
}
else {
endMessage = endMessage + startMessage[i];
}
}
alert(endMessage);
Hot Jesus! This could be a good tool in your toolkit bug fix boy.
No comments:
Post a Comment