Javascript (JS) 字串轉字元陣列
Javascript (JS) 字串轉字元陣列
//--- //JS 字串轉字元陣列 var x = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz"; var myArray = []; function foo(x) { for (var i = 0; i < x.length; i++) { myArray.push(x.slice(i, i + 1)); } }; //----JS 字串轉字元陣列