Write a javascript program to extract the common elements and sort them in an ascending order.
let arr = [1,2,2,4,5,6,6,7,7]
let res = arr.filter((item, index)=>arr.indexOf(item) !== index).sort((a,b)=>a-b)
console.log(res)
reactonme.hashnode.dev1 min read