magic, but not *so* magical i'm unwilling to put it in production code
function sortChildren(element, func) {
[...element.children].sort(func).forEach(node => element.appendChild(node));
}
function sortChildren(element, func) {
[...element.children].sort(func).forEach(node => element.appendChild(node));
}
Likes: 0
Boosts: 0
Hashtags:
Mentions:
Comments
Displaying 0 of 1 comments
mixed berry social anxiety disorder 🍓
in the actual code there is a comment
Likes: 0
Replies: 0
Boosts: 0