JavaScript 支持多种循环方式,其中一种是遍历对象的属性。可以使用 for...in 循环遍历对象的属性。语法如下: for (var key in object) { // code to be executed }