CodeWars: Sort the odd
Kata: Link
You have to create an algorithm that will swap only the odd numbers, this was the solution submitted by me:
function sortArray(array){
const odds = array
.filter( item => item % 2)
.sort((a,b) => a < b ? -1 : 1)
return array
...
blog.cupofcraft.dev2 min read