This code was in a quiz of Dart course that I'm taking, please help me solve it. I want to know what it should display. I solved it as 6, but the answer was 1, but I don't know why.
int var1 = 5;
int var2 = 6;
if ((var2 = 1) == var1)
print(var2);
else
print(var2++);