stackoverflow: How do I see if two characters are separated in a specific way in a string?

http://stackoverflow.com/questions/22029990/how-do-i-see-if-two-characters-are-separated-in-a-specific-way-in-a-string

HTML

<span id="value">Placeholder</span>

JavaScript

function ABCheck(str) {
    for (var i=0; i < str.length; i++){
        if ((str.charAt(i) == "a") && (str.charAt(i) == "b")){
            return true;
        }
    }
};

document.write(ABCheck('lane borrowed'));