+ 2
Equality Testing??
In the question that asks which operator would be used for equality testing, I chose this one : !=, but it said that was incorrect. Then I chose == and it was correct. They both test the equality though, right?
4 Respostas
+ 1
Thanks! 😊
+ 1
!= tests for inequality. That's why it returns true if the left side value differs from the right side value. Same logic for ==
0
Corelenda, thanks for the fast answer! But they are testing for equality, though in different ways, so I declare that question wrong! 😝
0
Yeah, both testing equality, but the "==" is comom used for testing of equality and the "!=" for diferences