An array is an ordered, indexable collection for holding data. JavaScript provides methods to construct arrays and to search their contents. section 9.0
Common array methods support two tasks:
- Construct arrays with Array.from, Array.of, or Array.prototype.fill. section 9.0
- Search arrays with Array.prototype.includes or Array.prototype.find. section 9.0
$('.danger').css('color', 'red');
A DOM task makes the collection distinction concrete: select elements with the class danger and set their color to red. querySelectorAll returns a NodeList, not an Array. section 9.0 section 9.0
Arrays as generator input
A prisoner factory can receive an array of numbers recording previous sentence lengths. It uses those stats to adapt the prisoner it generates. section 19.1







































