I have the following code to count number of each word in given string:

```
function countWords(str) {
  if (str === "") {
    return {};
  }
  var holder = str.split(" ");
  var holder1 = holder.reduce(function (allNames, name) {
    if (name in allNames) {
      allNames[name]++;
    }
    else {
      allNames[name] = 1;
    }
    return allNames;
  }, {});
  return holder1;
}

countWords("Here I I am here here");

```

I understand everything that is going on in the code, but I can't understand why none of my tests passes unless I have the empty object `{}` located on line 18 after the comma. Can someone please explain the purpose of this? Thanks in advance.