How to get a Value from NodeList?

See here for the original answer.

One way to access the items returned from getElementsByNodeName is from W3 Schools:

const collection = document.getElementsByName("phone");
for (let i = 0; i < collection.length; i++) {
  let valueYouAreInterestedIn = collection[i].specialKeyYouWant;
  // Use the value below :)
}

Please comment if there is anything else you need help with!


Tags

  1. javascript (Private)
  2. nodelist (Private)
  3. stack-overflow (Private)
  4. answer (Private)