Why isn't my function defined?
<p>How come this returns an error? 
In my head tag...</p>

<pre><code>var movieArray = [
["Everything is Illuminated", "0", ""],
["The Girl Who Leapt Through Time (Toki wo kakeru shojo)", "1", "&lt;ol&gt;&lt;li&gt;&lt;span class=\"bold quote_actor\"&gt;Kosuke Yoshiyama: &lt;/span&gt;&lt;span class=\"line\"&gt;It&amp;#039;s not that rare. Many girls do it at your age.&lt;/span&gt;&lt;/li&gt;                                                &lt;/ol&gt;"],
["Freedom Writers", "0", ""],
["Inside Man", "0", ""]
];

function checkAnswer(this.value) {
    if (this.value == 0) {
        alert ("Wrong answer!");
    } else {
        alert ("Correct Answer!");
    }

}
</code></pre>

<p>In the body... </p>

<pre><code>&lt;p&gt;&lt;a id="0" class="btn btn-primary btn-large" value="0" onclick="checkAnswer(this.value)"&gt;Everything is Illuminated&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a id="1" class="btn btn-primary btn-large" value="1" onclick="checkAnswer(this.value)"&gt;The Girl Who Leapt Through Time (Toki wo kakeru shojo)&lt;/a&gt;&lt;/p&gt;
</code></pre>

<p>The error is checkAnswer() is not defined. How come?</p>

<p>Thanks. </p>
