Tell us what’s happening:
I am not sure what I am doing wrong, this will not pass.
After several failures, I looked at the code for the “Hint”.
What is said to be the solution is one of the code attempts I wrote on the exercise.
I have tried single quotes, double quotes, white space after the commas, no white space after the commas… all to no avail. I pasted the code into Scrimba and it ran correctly there.
Assistance would be appreciated so I can move on.
Your code so far
function mixedNumbers(arr) {
// change code below this line
arr.unshift('I', 2, 'three');
arr.push(7, 'VII', 9);
// change code above this line
return arr;
}
// do not change code below this line
console.log(mixedNumbers(['IV', 5, 'six']));
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-data-structures/add-items-to-an-array-with-push-and-unshift