摘要: Js 中为数组提供了多种遍历方式 const ary = ['a', 'b', 'c']; // 最基本的方式, 只能遍历下标有序递增的数组 for (let i=0; i<ary.length; i++) { console.log(i, ary[i]); // 0 a 1 b 2 c } // 阅读全文
posted @ 2021-04-15 20:19 干饭吧 阅读(38) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi 阅读全文
posted @ 2021-04-15 20:07 干饭吧 阅读(964) 评论(0) 推荐(0) 编辑