https://tutorial.eyehunts.com/js/how-to-avoid-nan-in-javascript-basic-code/
How to avoid NaN in JavaScript | Basic code