Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers. Closed 6 months ago. Improve this question
Tag: nan
function returning NaN in javascript
I am trying to write a function that calculates the average student age in a list of student objects, but when I run the code the function prints NaN as an output this is how i constructed the array ( i got the input from the user) i tried to calculate the total of student age (removing the divide operation)
Break on NaN in JavaScript
Is there any modern browser that raises exceptions on NaN propagation (ie multiplying or adding a number to NaN), or that can be configured to do so? Silent NaN propagation is an awful and insidious source of bugs, and I’d love to be able to detect them early, even at a performance penalty. Here’s an example bug that use strict,