window.location is an object, it has several properties-
host,protocol,pathname,hash,search and href
and reload and replace methods.
window.location.href is the string value of the URL.
Use location when you want the object, href when you want the string.
the toString() method of the location object returns the location.href value,
so using location where it expects a string will convert it to a string.