Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1[...nums] | ACreates a new object with a copy of obj's properties | |
| 2{...obj} | BWrong - the spread operator needs exactly three dots | |
| 3Combines two arrays into a single new array | C[...arr1, ...arr2] | |
| 4Passes each array element as a separate argument | DCreates a new array with a copy of nums' elements | |
| 5let b = [..a]; | EWrong - the spread operator needs three dots, not two | |
| 6let d = [....c]; | Fconsole.log(...nums) |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
... — Expands an array or object's elements individually, often used to copy or combine them.let copy = [...nums];let arr2 = [...arr1];let objCopy = {...obj};console.log(...nums);let newArr = [...oldArr, 4];