Question from the Javascript - Fundamentals test

Use spread operator to split an array into two arrays in Javascript

Easy

What does the following code display?

let data = ["1","85","05","78", "006", "084","36"]; 
const [... vitalCard] = data; 
data = ["gender", "year","month","depart","city","civil","key"];

console.log(vitalCard); 
console.log(data);
Author: KahinaStatus: Published(Update)Question passed 2274 times
Edit
6
Community Evaluations
developer avatar
Nicolas
26/11/2023
This is an interesting question, but I'm not sure all Vanilla JS developers are used to this syntax, or are they?
developer avatar
Auteur anonyme
27/11/2023
I guess to