Relative Content

Tag Archive for javascriptangularlargenumber

adding strings of billions to javascript/angular array of numbers acting strange

I’ve got an array of objects with a targeted field containing a string value that could be greater or less than a billion. When I loop through and push the strings to my array: number[], values over a billion magically become values like 5. Hundreds of millions work fine. I’ve tried a several strategies (BigInt, if/else to sort on value, etc.), but I’m missing something dumb here. Here is the code block: