Why does this variable cause an “is not a function” error?
<pre><code> window.onload = raknaUtMedelvarde;

function raknaUtMedelvarde(){

    var tabell = document.getElementById("temperaturtabell");
    var rader = tabell.getElementsByTagName("tr");

    for (var i = 0; i &lt; rader.length; i++){
        var tabellcell = rader[i].getElementById("td");
       //räkna ut medelvärde
        var medel = medelVarde(tabellcell);

        var medelText = document.createTextNode(medel);
        var medelElement = tabellcell[tabellcell.length - 1];
        medelElement.appendChild(medelText);


    }
}

function medelVarde(celler){
    var summa = 0;
    for (var i = 1; i &lt; celler.length - 1; i++){

         var nuvarandeVarde = celler[i].firstChild.nodeValue;
         summa = summa + parseInt(nuvarandeVarde);
    }
    return summa / 5;
</code></pre>

<p>According to the <strong>error-console</strong> on Firefox this variable "tabellcell: var tabellcell = rader[i].getElementById("td");" is not a function? uhn?</p>
