added merge sort implementation in JavaScript