Awesome review, thank you! I have addressed pretty much all your points but I won't go down the 1 << 31 and beyond rabbit hole, although you are right the post was misleading, and I actually had to (2 ** 31) & 1 to indeed realize that all operations are broken regardless the fact the integer is theoretically safe, as Number.MAX_SAFE_NUMBER would suggest. I guess I would've learned it the hard way once added more values to some code I'm working on, so apologies for that misleading bit, now removed, and thanks again for the hints 👍
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Awesome review, thank you! I have addressed pretty much all your points but I won't go down the
1 << 31and beyond rabbit hole, although you are right the post was misleading, and I actually had to(2 ** 31) & 1to indeed realize that all operations are broken regardless the fact the integer is theoretically safe, asNumber.MAX_SAFE_NUMBERwould suggest. I guess I would've learned it the hard way once added more values to some code I'm working on, so apologies for that misleading bit, now removed, and thanks again for the hints 👍