不多说,直接上干货! java里如何实现循环打印出字符里的内容 没写,暂时不会 java里如何实现循环打印出字符数组里的内容 public class test { public static void main(String[] args) { String str = "; char[] s = str.toCharArray();//这是字符串转变成字符数组 for(char val : s){ System.out.println(val); } } }…
一 ,var dataArr = []; var data = new Date(); var year = data.getFullYear(); data.setMonth(data.getMonth()+1, 1)//获取到当前月份,设置月份 for (var i = 0; i < 12; i++) { data.setMonth(data.getMonth() - 1);//每次循环一次 月份值减1 var m = data.getMonth() + 1; m = m < 10 ? &…
JS: var arrData = [1,3,5,7,7,8,9,3,10,8,"sdsdsds","sss","ffff","sss","sss"];function uniqueArray(data){ data = data || []; var a = {}; for (var i=0; i<data.length; i++) { var v = data[i]; if (typeof(a[v…