18. Getting the result

html-css
js

#1

https://www.codecademy.com/courses/html-javascript-css/2/6#

I don’t get it, what am I supposed to type

function processForm() {
    
    var temperature = Number(document.tempForm.temp.value);
    var tempType;
    var result;

    for (var i=0; i < document.tempForm.choice.length; i++) {
        
        if (document.tempForm.choice[i].checked) {
            tempType = document.tempForm.choice[i].value;
        }
    }

    if (tempType == 'fahrenheit') {
        result = temperature * 9/5 + 32;
    }
    
    else {
        result = (temperature -  32)  *  5/9;
    }
    
    // Assign the result field value here
   var resultField= Number(document.tempForm.resultField.value);
}

#2

Compare…

document.tempForm.resultField.value = result;