As and In (in actionscript 3.0)

So i’ve always been a little confused as to what As and In do.
:ne:


var displayValue:Object = d[n];
displayValue = FacebookDataUtils.stringToDate(displayValue as String); break;

would this make displayValue a string? Or would it do something entirely unrelated to that?


private var d:Array = new Array();

for (var n:String in d)


I think that this would check for the string “n” in the array d which you could follow with a function block.
Thanks in advance…