Diff Two Arrays - console log not showing quote with quotations

Tell us what’s happening:
What is the issue with the code so far? the console log shows the correct output but its not showing the string with quotation marks.

Your code so far


function diffArray(arr1, arr2) {
  let concatArray = arr1.concat(arr2);
  let newArray = [];

  function included(x){
    if(arr1.includes(x) == false || arr2.includes(x) == false){
      return x
    }
  }

  newArray.push(concatArray.filter(included));

  return newArray;
}


console.log(diffArray([1, "calf", 3, "piglet"], [1, "calf", 3, 4]));


Link to the challenge:

If you’re talking about "calf" and "piglet", then the strings to not contain any quotation marks. Rember that in order for JavaScript to know when a string begins and ends it must be wrapped in quotes.

Here is the relevant FCC lesson

Its not allowing me to complete the task even though the output is coming out correct on the console.log

Your returned value is not correct. You are returning a multi-dimensional array instead of a flat array.

Got it, forgot filter returns an Array. Thank you!

I’m glad I could help. Happy coding!