http://learn-share.net/programming-basics-course/
Programming Course. The Basics of Programming.
#18 Compare Operators
Learn to code.
Setting comparison operators.
So when we write if statements, and we want to check if a variable is equal to another variable, we use the double equal sign, the equality operator.
In this case, if the content of the variable A, is equal to the contents of variable B, we going to execute what ever statement are inside the opening and closing curly braces.
Now is a mistake that is very easy to make. Pure much every programer in C based language will make sometimes in their career.
And is to use accidentally the assignment, single earl sign, instead of equality, the double equal sign. Or in java_script the triple equal sign.
What this means. We say we create a couple of variables. Variable A, set it to equal to 5, variable b, set it to equal to 10.
Using the single equal sign, to assign, to set the values of this variables.
And a little late in the code, i might write, if statement.
…
