function filter(array, condition) {
  var emptyArray = []
  array.forEach(function(element) {
    if (condition(element))
      emptyArray.push(element)
  })

  return emptyArray
}
Given an array and a condition, return the array by removing all elements
that do not meet the condition