console.log(~true);
var a = true; ~a = - (a + 1) ~true == ~1 // true is always 1
Login in to like
Login in to comment
@224930110692 @mrameshkumarc21 it is tilde (~) operator, not minus
2017 Dec 5, 3:40:27 PM
-true = -1
2017 Nov 27, 12:44:38 PM
result of this question is wrong;
2017 Nov 27, 12:44:25 PM
i didn't understand this description
2017 Oct 11, 4:00:11 AM
Didn't notice it is tilde, thought it was minus :/
2015 Jun 26, 10:35:28 PM
or Read more about JavaScript Quizzes
Login in to like
Login in to comment