This software is for users who enjoy the thrill of trying to untangle the mess of nested loops and recursive calls. It's like trying to find a needle in a haystack, but the haystack is on fire and the needle is a raccoon.
function spaghettiOptimize(input) {
var output = [];
for (var i = 0; i < input.length; i++) {
if (input[i].length > 1) {
var j = input[i].indexOf(input[i][0]);
output[j] = input[i];
} else {
output.push(input[i]);
}
}
return output;
}
Actual reviews from people who've actually used it: