Programming: == to Test for True of False in a Condition and = is an Assignment Operator
The == (double equals) is a logical operation that returns a true or false. The variable or value is on the left of the == and the test value is on the right. Example: Pressed == 0. That will return true if the Pressed variable is assigned a 0 value. If the Pressed variable is not assigned a 0 value, then the condition will be false and if used in a if {} else {} statement, the code in the else code block will be executed. If a single equals sign = is used, then the variable on the left of the = will be assigned the value on the right.
Comments and Additional Information
Have some code to share? Or additional information? Respond here:
You need to be logged in to save a response on this page. The response must be constructive, helpful, supplimentary or to correct the existing video, code or narrative content.