Implement a JavaScript function that accepts an array of strings and returns an object with the frequency count of each unique string in the array.

function countStrings(arr) {
  const result = {};
  for (const str of arr) {
    if (result[str]) {
      result[str]++;
    } else {
      result[str] = 1;
    }
  }
  return result;
}

// Example usage:
const inputArray = ['apple', 'banana', 'apple', 'orange', 'banana', 'apple'];
console.log(countStrings(inputArray));
// Output: { apple: 3, banana: 2, orange: 1 }