If i use a code like shown below,why the upper return statement takes precedence and the other return statemend after braces does not get executed.
function some4(array, f) {
for (let i of array) {
if (f(i)) return true;
}
return false;
}
Because once the return is executed it will terminate that function.