```
function isBlank(s){
    var len = s.length
    var i
    for(i=0; i<len; ++i) {
        if(s.charAt(i)!= " ") return false
    }
    return true
}

```

I am totally new to JavaScript and coding. Please can someone explain me how is this code working.
I know that it is being used to check whether a input box has some value or not, but I know no further.

question update....
See, in the above code, the for loop runs and if the string is not blank it returns false.
Now for loop ends and browser reads the next line which is-- returns true--. So is not the function finally returning true. No matter if there was a return false in the middle.