===is a strict equality operator. Try it instead ==.
true==1will be graded before true.
The strict equality operator ===considers only values equal if they are of the same type. The smaller equality operator ==tries to convert values of different types before comparing them with strict equality.
Case 1:
true===1, true boolean, 1 . , true===1 false.
2:
true+true===2 true-true===0 ( + ===. . ), .
(true+true===2) true+true 2. . .. (2==2) true.