Advertisement
Guest User

Untitled

a guest
Feb 25th, 2020
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. const armarEquipos = () => {
  2. console.log("el arreglo original es: ", crearArray)
  3. const perPorEquipo = 2
  4. for (let i = 0; i < crearArray.length; i += perPorEquipo) {
  5. let pedazo = crearArray.slice(i, i + perPorEquipo);
  6. arrayEquipos.push(pedazo);
  7. }
  8. console.log("el nuevo array es: ", arrayEquipos)
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement