我正在比较两个整数值,但是parseInt给出了NaN的可能性。我想知道我是否需要做额外的检查。= null) { var toCustomerId = parseInt(txtToCustomerId.value);
if (fromCustomerId > toCustomerId) { <---There is chance of parseInt g
我正在尝试实现一个(非常)简单的try{}catch{}块,如下所示: var invoice = parseInt(localStorage[0]); throw "invoice not a number"; console.log("localStorage当I parseInt(localStorage)时,它返回NaN,并将其存储