3 AnswersNew Answer
The && operator returns true only if the expression on both sides evaluates to true. So first it checks 'banana' which is true and then 'apple' which is also true. But you get 'banana' as result because it returns the last expression which evaluated to true. You can replace the && with || and you can see that it prints 'banana' because for || operator to return true, expression on any one side must return true. Since 'banana' returns true, it doesn't even care to check for the other expression which is 'apple'.