I am currently on a mission to locate an odd string within a given array.
Here's the code:
const friendArray = ["agdum", "bagdum", "chagdum", "lagdum", "jagdum", "magdum"];
function findOddString(arr) {
for (let i = 0; i < arr.length; i++) {
if (arr[i].length % 2 !== 0) {
return arr[i];
}
}
}
const mysteriousFriend = findOddString(friendArray);
console.log(mysteriousFriend);