1.

Write A Jquery Code Snippet To Sort A String Array?

Answer»
$(document).ready(function(){
var arr = [ "jQuery","Interview","Questions","By","InterviewBit"];
sortedArr = arr.sort();
$("#elementId").html(sortedArr.join(""));
});

The Output will be

["By","InterviewBit","Interview","jQuery","Questions"]




Discussion

No Comment Found