Whay else don't work when i enter number it translate it as NaN

input.onchange = function(){

    const num = input.Value;

    if(isNaN(num))

    {

        para.textContent = 'You need to enter a number';

    }

    else

    {

        para.textContent = num + ' square is ' + squared(num) + '. ' + 

        ' cubed is ' + cubed(num) + '. ' + 

        ' factorial is ' + factorial(num);

    }

}

Hi,

You have a typo here:

It should be value in lowercase:

const num = input.value;
1 Like