Question

“It’s a bird! It’s a plane! No, it’s Superman!”
We want to write a function isSuperman that takes in two parameters isBird and isPlane and returns true if it is in fact Superman, and false otherwise.
If it’s not a bird and it’s not a plane, it must be Superman.
Which of the following functions is the correct implementation of isSuperman?



function isSuperman(isBird, isPlane){
return isBird || isPlane;
}
JavaScript

function isSuperman(isBird, isPlane){
return !isBird || !isPlane;
}
JavaScript

function isSuperman(isBird, isPlane){
return !isBird && !isPlane;
}
JavaScript

function isSuperman(isBird, isPlane){
return isBird && isPlane;
}

Answers

There are no human answers yet.
There are no AI answers yet. The ability to request AI answers is coming soon!

Related Questions