请帮助我解决我的问题。

我在第2行收到一个.length错误。 “ index.js:10未捕获的TypeError:无法读取未定义的属性'length'”

form.addEventListener('input', pushData, false);{
    if (name.value.length >= 0) {
        btn.setAttribute('disabled', 'disabled')
        document.getElementById('submitInput').innerHTML = ("Hello If statment here!")

    } else {
        document.getElementById('submitInput').innerHTML = ("Hello Else statment here!")
        btn.removeAttribute('disabled');
    }



function pushData() {