I know this question might have been asked a lot of times but I don't really get the function isNan()
. I have a calculator and if the result is "NaN" (for example 0 divided by 0), I want to alert 'Doesn't work!'. I thought of something like:
function Error() {
if ($('#result').val() == NaN) {
alert.('Doesn't work!');
}
};
The result is in the input with the #result. How do i use isNan() here? Can someone help me please? Thanks for responding and sorry for the same question again.