DEV Community

Discussion on: JavaScript Array Methods.

Collapse
 
rorschach profile image
R-Lek • Edited


let arr = [1,3,2,4,6];
arr.sort();
console.log(arr); // O/P = [1,2,3,4,5]

-> 6 changed into a 5?

Collapse
 
ajaysharma12799 profile image
Ajay Sharma

Sorry Brother That was My Typing Mistake, I am Correcting It
Thank You 😁👍