Avent

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2013年10月24日

摘要: 看书有段代码如此: var person ={ name: "Nicholas"}; var people =[{ name: "Nicholas"}]; var morePeople = [person]; alert(people.indexof(person)); //-1 alert(morePeople.indexof(person)); // 0 lastindexof 和 indexof 是对数组寻找位置的函数indexof(查找的项,起点位置索引(可选)) 从数组开始查找;lastindexof 从数组的末尾开始查找;关于花括号和方括号有 阅读全文
posted @ 2013-10-24 09:30 Avent 阅读(713) 评论(0) 推荐(0) 编辑