I’ve never done any ActionScript before, but what does the line marked below do?
var s:Object = {};
for (var i:int = 0; i < 1000; i++)
{
s[i] ? s[i]++ : s[i] = -1; //this line
}
It looks similar to a C# shorthand If...Else but I don’t understand what the condition is in this case.
It is ternary operator aka conditional operator.