How to check if element has an specific children in Javascript? code example Example: how to check if a tag has any chidren tag.hasChildNodes()