fork download
  1. // your code goes here
  2. a = ["a", "p", "p", "l", "e"];
  3. b = [1, 2, 3, 4, 5];
  4.  
  5. const soal2 = (a, b) => {
  6. newArr = [];
  7. for (i = 1; i < a.length; i++) {
  8. newArr.push(a[i]);
  9. newArr.push(b[i]);
  10. }
  11. return newArr;
  12. };
  13. soal2(a, b);
  14.  
Success #stdin #stdout 0.03s 16808KB
stdin
Standard input is empty
stdout
Standard output is empty