Copy link to clipboard
Copied
What is the different between variable == 1 and variable = 1?
One = sign and Two = signs?
Copy link to clipboard
Copied
the double equal (==) is used for testing equality. the single equal (=) is the assignment operator.
var1 = 1; // assigns the value of 1 to the variable var1
if(var1==1){
// this executes if var1 has a value of 1
} else {
// this executes if var1 has a value other than 1
}
Find more inspiration, events, and resources on the new Adobe Community
Explore Now