I need write a function called that takes in one argument, which is a list of elements. In the list of elements there's ONE element that has an ID,but I don't know what's the ID called. The function should change the inner text of the element to be the value of the ID. Example:
<div><div/>
<div><div/>
<div><div/>
<div id="special"><div/>
<div><div/>
let divs = querySelectorAll('div')
findId(divs)
What it should do :
<div><div/>
<div><div/>
<div><div/>
<div id="special">special<div/>
<div><div/>
I have tried using innerhtml but I do not know how to go about doing it,as the id is unknown.
Please help out.