1

Just look at the code and click the buttons

Why big number increases by 10?

But, sometimes it decreasing by different values

function get(fp, sp) {
  $('.out').html(fp+ ` : ` +sp)
}
function gets(fp, sp) {
  $('.outs').html(fp+ ` : ` +sp)
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<button onclick="get(345585940394583240, 1245)">Send values (not string)</button>
<p class="out"></p>
<button onclick="gets('345585940394583240', 1245)">Send values (string)</button>
<p class="outs"></p>
  • 1
    Just type console `345585940394583240 > Number.MAX_SAFE_INTEGER` and you will see it's true. Might be the case for you – halilcakar May 20 '20 at 23:45

0 Answers0