i used to select ID from the DOM by using
const elem = document.getElementById('ID');
in order to manipulate an element
recently by accident encounter this : (see snippet below) i can select a DOM element by its ID just by write the id as variable and i can manipulated how its even possible ?
this is a working fiddle snippet
myInput.value = 'hello world'
<input type="text" id="myInput">