To get an array of selected checkboxes values we need to use jQuery each()
method and :checked
selector on a group of checkboxes.
The each()
method will loop over the checkboxes group in which we can filter out selected checkboxes using <strong>:checked</strong>
selector.