need to return index of second occurrence if no duplicate return not found
const forAll = (str) => {
var forAllmini;
for (var i = 0; i < str.length; i++) {
forAllmini = (str[i] != str[i+1]) ? 'not found': `@ index ${i}`;
}
return forAllmini
}
console.log(forAll('carrot'))
i tried this but i only get 'not found'