Hey everyone! Why does return not working here but the console.log() shows the correct result?
function findvalue(arr,num){ const arr1 = arr.find((el) => el === num) const arr2 = arr1? true: “Not found”; //console.log(arr2) return arr2 } console.log(findvalue([false, “7”, null],7) The function suppose to return true if the num would be found among one of the elements of array, otherwise return the string “Not found” javascript arrays return New contributor KevinBacker […]