function diffArray(arr1, arr2) {
  console.log(_.difference(arr1, arr2)) //returns pink wool based on the function call below

  return _.difference(arr1, arr2)
}

diffArray(
  ["diorite", "andesite", "grass", "dirt", "pink wool", "dead shrub"],
  ["diorite", "andesite", "grass", "dirt", "dead shrub"]
);

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.15/lodash.min.js