This works, but I don't understand why:

```js
function hasUppercase(input) {
  for (var i = 0; i < input.length; i++) {
    if (input[i] === input[i].toUpperCase()) {
      return true
    } else { 
      return false
    }
  }
}

console.log(hasUppercase("no"));
console.log(hasUppercase("Yes"));
```

How come the 'true' for the 'Yes' beats all the falses?