AS3在阵列中?

ActionScript3
阅读 49 收藏 0 点赞 0 评论 0

/**
 * _isInArray
 * Checks to see if a supplied element is in an array.
 * the indexOf function returns -1 if it doesn't find the 
 * element in array, so we check if indexOf returns 0 or greater.
 * 
 * @param element * (any object) The element we are checking for
 * @param array Array The array to see if element is in
 * @return Boolean True if element is found in array, False if not
 * @access private
 */
private function _isInArray(element:*, array:Array):Boolean
{
    return (array.indexOf(element) >= 0);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号