I've tried to solve the issue by changing arr.join("<br>") to arr.join("/n") in the following code but that still doesn't work for me to get this task completed, even though it's giving me the expected answer. Why?
PREVIOUS CODE
const printArray = (arr) => {
console.log( arr.join( "<br>" ) );
};
const months = [ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ];
printArray( months );
LATEST CODE
const printArray = (arr) => {
console.log( arr.join( "/n" ) );
};
const months = [ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ];
printArray( months );
The task states the following errors:
printArray should print as many strings as there are elements in the array
printArray should print all the elements of the array