DEV Community

Discussion on: Interview Qs Decoded - # 1

Collapse
 
miketalbot profile image
Mike Talbot ⭐

Sure good point:

const [second, max] = array.sort((a,b)=>a-b).slice(-2)