yesterday i went to an interview i was asked a question which is below
Create an input field and button user should enter only 0 or 1 when the user enters 0 the output should be 1. when the user enters 1 the output should be 0. Write the logic of minimum 5 possible way of the output?
Note:
We should not use any if,for,while,do while,if else,switch,.. (no condition and loops) should be used.
It should be done in java script and minimum 5 possible way to print the out .
I don't know whether it is possible or not for 5 times. if any one knows please help me