So lets say i have the following code:
function c (f,i) {
let x = i;
if (f(x,i)){
x--;
}
if (f(x,2)) {
console.log(1);
}
else {
console.log(2);
}
}
what exactly happens in the if statements, i dont understand the syntax behind it. f is no function, its a variable, so what happens here? does it equal to f * ( x * i) ? whats the operands behind this syntax. Thanks in advance
Aucun commentaire:
Enregistrer un commentaire