Spread and Rest Operators in JavaScript
The ... operator (spread or rest) is one of the most useful ES6 features. It has two main uses depending on context: spreading elements/properties or collecting (rest) them.
Spread Operator – Expanding
Spread expands an iterable (array, string) or object into individual elements/properties.
Spread with Arrays
Spread with Objects
Rest Operator – Collecting
Rest Parameters in Functions
Rest in Destructuring
Quick Quiz
Hemos revisado y comprobado los materiales, pero aún pueden existir errores. El contenido se ofrece únicamente con fines educativos, así que úsalo bajo tu propia responsabilidad y verifica con otras fuentes si es necesario.
✨ Pregunta a Lara — tu compañera de estudio con IA
Desbloquea soporte de aprendizaje personalizado. Lara puede explicar lecciones, resumir temas y responder tus preguntas — disponible desde el plan Go y superiores.
Lara te ayuda a aprender más rápido — exclusivo para los miembros ReadyTools Go, Plus y Max.
