摘要: stackoverflow上有一个类似的问题 https://stackoverflow.com/questions/29285897/difference-between-for-in-and-for-of-statements //for..of与for..in的区别 var arr = [3, 阅读全文
posted @ 2024-08-15 18:26 katesharing 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 读取属性的方法记一下 //js object的写法 const person = { firstName: "John", lastName: "Doe", age: 50, eyeColor: "blue", fullName: function () { return this.firstNam 阅读全文
posted @ 2024-08-15 18:17 katesharing 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 一、常用的测试写法 //array的写法 var myArray = ["Apple", "Orange", "Banana"]; //一、正常循环写法如下: var fruitFinal3 = "" for (var i = 0; i < myArray.length; i++) { fruitF 阅读全文
posted @ 2024-08-15 17:58 katesharing 阅读(2) 评论(0) 推荐(0) 编辑
摘要: JS写法如下: const myObj = { name: "John", age: 30, cars: [ { name: "Ford", models: ["Fiesta", "Focus", "Mustang"] }, { name: "BMW", models: ["320", "X3", 阅读全文
posted @ 2024-08-15 17:11 katesharing 阅读(19) 评论(0) 推荐(0) 编辑