Question
Javascript Sort method
I found this very informative post on the subject of the Javascript SORT method. I found, however, that VS Code does not recognize the method.
This is the error message I got:
numbers.sort((a,b) => a - b);
^
TypeError: numbers.sort is not a function
Has anyone else run into this?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×