In Javascript, we know that we can getElementByID but is there is an easy way of getIdByElement , I mean getting the id name through a tag name or something like that.

Please Help
Beginner in JavaScript