What is the diffrence between these condition?
if ((middleOfTabIndicator < index * tabIndicatorWidth)) {
if (index - 1 != featuredTabIndex) {
//do something
}
}
vs
if ((middleOfTabIndicator < index * tabIndicatorWidth) && ((index - 1) != featuredTabIndex)) {
//do something
}
All my variables are int. Aren't these conditions the same? When I write the first condition everything is OK but when I write the second condition the result changes. Why this happens?
Aucun commentaire:
Enregistrer un commentaire