The 'document.getElementById()' function in JavaScript is used to:
Create a new HTML element
Retrieve an HTML element by its unique ID
Modify the style of an HTML element
Add event listeners to an HTML element

Computer Science and Technology Exercises are loading ...