2012年9月18日

数组元素的查询与操作

摘要: 一、数组元素的查询var arr1:Array=[56,78,90,88,45,100,79,85,93];var score:int=100;var pos:int;//pos=arr1.indexOf(score,0);pos=arr1.lastIndexOf(score);if(pos!=-1) trace("您要查询的数据在数组中的第"+(pos+1)+"个位置上");else trace("您要查询的数据不在数组中");//输出:您要查询的数据在数组中的第6个位置上二、数组元素的操作var arr1:Array=[1,2,3 阅读全文

posted @ 2012-09-18 21:02 God is a girl 阅读(160) 评论(0) 推荐(0) 编辑

导航