从string[]转List<string>: " }; List<string> list = new List<string>(str); 从List<string>转string[]: List<string> list = new List<string>(); string[] str = list.ToArray(); Array类实现了数组中元素的冒泡排序.Sort()方法要求数组中的元素实现IComparab…
shift:删除原数组的第一项,返回删除元素的值:如果数组为空则返回undefined var arr = [1, 2, 3, 4, 5]; var out = arr.shift(); console.log(arr); //[2,3,4,5] console.log(out); //1 var arr = []; var out = arr.shift(); console.log(arr); //[] console.log(out); //undefined unshift:将参数添加到…