Could I please ask for some clarification, here? Just want to make sure that I understand. What I gather from the instructions is that we are looking to return an array made up of “num” and strictly numbers. What I think is being said here is, make sure that the property is a number or an integer type… Am I grasping the instructions, if not could someone please help maybe reword the instructions or just throw a hint…
Thanks in advance.
**Your code so far**
function copyMachine(arr, num) {
let newArr = [];
while (num >= 1) {
// Only change code below this line
// Only change code above this line
num--;
}
return newArr;
}
console.log(copyMachine([true, false, true], 2));
**Your browser information:**
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36
Challenge: Copy an Array with the Spread Operator
Link to the challenge:
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-data-structures/copy-an-array-with-the-spread-operator