I am using sort() function of Array Library in JS. But, I am not getting correct result. Can anyone point out why?
<html>
<head></head>
<body>
<script>
var a = [5, 17, 29, 48, 64, 21];
var c = a.sort();
alert(c);
</script>
</body>
</html>
Why 5 is not coming in the beginning, but somewhere in middle? Can someone help?