parseInt在ts文件中编译报错?-灵析社区

楠楠不难难

ts文件中,Math.round和parseInt函数中包裹同样的表达式,为什么parseInt方法会有报错? const current = 10; const sumData = 30; const roundData = Math.round(current / sumData); const intData = parseInt(current / sumData) Math.round正常编译,parseInt编译报错

阅读量:21

点赞量:0

问AI
卑微实习僧
跟ts有关系吗?js也会报错吧,parseInt针对的是字符串