1. Computing & Technology

Discuss in my forum

ActionScripting Basics: What’s the difference between = and ==?

By , About.com Guide

3 of 3

==
ActionScripting Basics: What’s the difference between = and ==?
x = y 
if (x ==y) { 
gotoAndPlay(3) ; 
}

In the if statement above, however, a double equal sign is used (==) to compare the two and return a value: true or false. Flash checks to see if x is equal to y; if it is, it returns true, and the conditions inside the if statement are executed. If x and y are not equal, then Flash returns false, and the if statement is not executed.

©2012 About.com. All rights reserved.

A part of The New York Times Company.