We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
If you run the snippet below in your console you will see the result is NaN (not a number) indicating that the subtraction cannot be calculated, thus we have to compare larger integers based on their individual character values:
Big Sorting
You are viewing a single comment's thread. Return to all comments →
JavaScript has a maximum value of Number types it can process as numbers, see max integer value in JavaScript
If you run the snippet below in your console you will see the result is NaN (not a number) indicating that the subtraction cannot be calculated, thus we have to compare larger integers based on their individual character values: