In languages like AngelScript, C/C++, Java, C#, etc, there's only the == comparison operator.
They make an important distinction between the assignment operator (=), and the comparison operator (==). Assignment is used to assign values to variables, like in:
int remainingPuzzlePieces = 5;
In almost every case, it is an error to use the = operator in an if-statement. For example, if you wrote:
if (remainingPuzzlePieces = 3)
{
// do something ...
}
it would
NOT check if the value is 3, but it would assign the value of 3 to the variable, instead, the whole assignment expression would evaluate to
true or
false, in a language-specific way. For example in C++, the whole
remainingPuzzlePieces = 3 thing would evaluate to the number 3, as if you've written if(3); and in C++ any non-zero value is treated as
true - so it transforms to if(true), which means that it will always execute.
I'm not sure how AngelScript treats this case, but you could write a simple function to check.
Now, those were all so-called statically typed languages. In dynamically typed languages, values can easily "transform" into one another. You can put a string into a variable that held a float, or an int, things like that. This is common in scripting languages, often used with games, but it's not the case with AngelScript.
Both the == and === operators appear in the languages of this other kind, and they have a slightly different meaning.
For example, in PHP, unlike in AngelScript:
5 == "5" evaluates to
true ("5" is converted (cast) to 5, and then they are compared)
5 === "5" returns
false, since the left one is a number 5, and the right one is a string (text) "5"; but
5 === 5 evaluates to
true.
So, === of PHP is more akin to == in AngelScript. It takes type information into consideration.