javascript comment trier les nœuds de DOM

var list = document.getElementById('list');

[...list.children]
  .sort( (a, b) => a.getAttribute('data-date') - b.getAttribute('data-date'))
  .forEach( node => list.appendChild(node));
DCmax1k