An open API service indexing awesome lists of open source software.

https://github.com/shekhardtu/js-sorting-algorithm

Sorting algorithm implemented using javascript
https://github.com/shekhardtu/js-sorting-algorithm

data-structures-and-algorithms datastructures-in-javascript

Last synced: 6 months ago
JSON representation

Sorting algorithm implemented using javascript

Awesome Lists containing this project

README

          

# Sorting algorithms implementation in javascript

## Javascript array function library

#### Remove duplicates in an array
```javascript
var array = ["Mike","Matt","Nancy","Adam","Jenny","Nancy","Carl"];
function removeDuplicate(array){
var uniqueNames = [];
$.each(names, function(i, el){
if($.inArray(el, uniqueNames) === -1) uniqueNames.push(el);
});
return uniqueNames;
}
```

#### Calculate execution time in JS
```javascript
var startTime = new Date().getTime();
function functionExecution();
var endTime = new Date().getTime();
var executionTime = endTime - startTime;
console.log(executionTime);
```