What is wrong with this charcode boolean statement?
<p>I have an if/else statement inside a class object. The if checks a boolean statement, but returns the wrong result.</p>

<pre><code>function person(name) {
    this.name = name;
    this.age = (function age() {
        if (this.name.toLowerCase().charCodeAt(0) &lt;= "n".charCodeAt(0)) {
            return "A";
        }
        else {
            return "B";
        }
    })();
}

var zoey = new person("Zoey");


console.log(zoey.name);
console.log(zoey.age);  // returns A

console.log("Zoey".toLowerCase().charCodeAt(0));  // returns 122
console.log("n".charCodeAt(0));  // returns 110
</code></pre>

<p>It works if I change "this.name" inside the boolean statement to just "name". Any idea why?</p>
