次のコードでは、abの値は何ですか?(未定義でも、nullでも、空の文字列でもありません)
var a = {} ;
a.b = [] ;
//////////////////////a.b["hello"]="hello"; //comment, uncomment for testing it
trace( a.b ) // output is invisible, something like blank string
trace( (a.b).length ); // 0 , this could be used but the index is string ie. "hello"
trace(a.b == undefined ) ; // false
trace(a.b == null) ; // false
擬似コード:
if ( a.b is not having any type of content inside )
{
//How to get inside this part, when a.b is not having any value
// do this
}
else
{
//do this
}