Doubt on question

how this is working…( 5+True=6)

Hey @navneetsingh77, this is working because True is interpreted or you can say type casted as 1. In case of 5+False, the answer would be 5 itself since false represents a 0.

I hope this clears your doubt ! :slight_smile:
Happy Learning !

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.