JSLint says “missing radix parameter”

前端 未结 11 1267
北荒
北荒 2020-11-30 17:10

I ran JSLint on this JavaScript code and it said:

Problem at line 32 character 30: Missing radix parameter.

This is the code i

11条回答
  •  失恋的感觉
    2020-11-30 17:27

    To avoid this warning, instead of using:

    parseInt("999", 10);
    

    You may replace it by:

    Number("999");
    


    Note that parseInt and Number have different behaviors, but in some cases, one can replace the other.

提交回复
热议问题