陣列方法的應用

預設的兩個陣列內容
var myarray1 = [ "one", "two", "three" ];
var myarray2 = [ "four", "five", "six" ];
  1. res = myarray1.join('| ') 輸出的結果: res: ""
  2. myarray3 = myarray1.concat(myarray2) 輸出的結果: myarray3: ""
  3. res = myarray1.pop() 輸出的結果: myarray1: ""
  4. res = myarray1.push("seven") 輸出的結果: myarray1: ""
  5. res = myarray1.shift() 輸出的結果: myarray1: ""
  6. myarray4 = myarray3.slice(1,4) 輸出的結果: myarray4: ""
  7. myarray3.sort() 輸出的結果: myarray3: ""
  8. myarray3.reverse() 輸出的結果: myarray3: ""
  9. res = myarray4.toString() 輸出的結果: res: ""