Element id Property Syntax:
element.id; element.id = “newValue”;
Element id Property Parameter
The value we set for this property will be considered as the value of the id attribute for the target element.
Element id Property Return Value
The return value of this property is the current value assigned to the id attribute.
Note: if the element does not have the id attribute, the return value of this method becomes an empty string.