Variables in scratch differ from variables in math class because we have to solve for variables in math, computers know the solution at all times.
The variable can be applied to either all sprites or one sprite specifically.
A variable can only hold one value at a time.
This doesn't work because value 2 cannot hold 2 values at the same time and it would just result in the same value for both.
The temp is changed to value 1, thus storing its data. Value 1 then becomes what value two is, and then value two becomes temp which is what value one used to be.
Back to Homepage