Modulo in JavaScript - large number

前端 未结 6 1992
情深已故
情深已故 2021-01-07 20:39

I try to calculate with JS\' modulo function, but don\'t get the right result (which should be 1). Here is a hardcoded piece of code.

var checkSum = 21050170         


        
6条回答
  •  忘掉有多难
    2021-01-07 21:22

    Silent Matt has developed a Javascript library for Big Integers. It could solve this issue too.

提交回复
热议问题