Working with Checkboxes, Radio Buttons, and Dropdowns

What is the purpose of this code pattern when working with multiple checkboxes?
const checkboxes = document.querySelectorAll('input[name="options"]');
const values = Array.from(checkboxes)
  .filter(cb => cb.checked)
  .map(cb => cb.value);
Next Question (2/22)