Every single programming language in the world makes use of variables to store and retrieve data to and from the memory of the computer. ActionScript and JavaScript are no exception! In Captivate, it is enough to know that a variable is a named space in the memory of the computer in which data can be read or written.
To make it short, a variable is made of two things:
A name: This name must comply with strict naming rules and conventions. In ActionScript for instance, the name of a variable cannot contain any spaces or special characters (such as @ é, è, ç, à, #, ?, /, and so on). When writing a script, the programmer uses the name of the variable to access the data it holds.
A value: The value is the piece of data that the variable contains. This value can change (vary) during the execution of the script or each time the script is executed, hence the name Variable.
For example, st_firstName = "Damien"
defines a variable.
st_firstName
is the name of the variableDamien
is the...