79532995

Date: 2025-03-25 08:03:06
Score: 0.5
Natty:
Report link

2020 Answer (According to MDN's 'widely available' for the spread syntax)

If you have your two sets of NodeList[], lets say

var ca = document.querySelectorAll(".classA");
var cb = document.querySelectorAll(".classB");

then this can be achieved as easily as

var combined = Array.from(ca).concat(...cb);
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: LukasKroess