This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function move_zeros(arrNum, isRight){ | |
| isRight = typeof isRight === 'undefined' ? true : isRight; | |
| // console.log(arrNum); | |
| // console.log(isRight); | |
| var arrNumLength = arrNum.length; | |
| function eliminateZeros(element) { | |
| return element !== 0; | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function duplicates(arr) { | |
| var mergedArray = [].concat.apply([], arr); | |
| console.log(mergedArray); | |
| var arrSorted = mergedArray.sort(function (a, b) { | |
| return a - b; | |
| }); | |
| console.log(arrSorted); |
NewerOlder