//These are not on the array prototype. They are on the array itself.
//Array.of()
// - just creates an array with however many arguments you pass it
Array.of(4, 'hello', {hello: 'hello', hi: 'hi'});
// [ 4, 'hello', { hello: 'hello', hi: 'hi' } ]
//Array.from()
// - Very useful when working with DOM elements
// - first param is the DOM node. For example. document.querySelectorAll('.people p');
// - also takes in a second parameter, a map function
// - allows you to modify the data as you create the array
`
<div class="people">
<p>Wes</p>
<p>Kait</p>
<p>Snickers</p>
</div>
`
const people = document.querySelectorAll('.people p');
const peopleArray = Array.from(people, person => {
console.log(person);
return person.textContent;
});
console.log(peopleArray);