for (int i=1;i<10;i++){
for(int b=1;b<=i;b++){
System.out.print(b+"*"+i+"="+b*i+"\t");
}
System.out.println();
}
String[] arr = new String[]{"a","b","c"};
for(String s:arr){
System.out.println(s);
}
for(var 变量 in 对象){ // 显示对象的所有属性,每次循环将对象的属性名赋值给变量
}
const array1 = [‘a‘, ‘b‘, ‘c‘];
for (const element of array1) {
console.log(element);
}
原文:https://www.cnblogs.com/chniny/p/14876192.html