// given html
<div class="parent">
<div class="child1">
<div class="child2">
</div>
</div>
</div>
// Get parent
let parent = document.querySelector('.parent');
// child element selector
parent.querySelector('.child')
/*
<div id="parent">
<input value="off" />
<button type="button">Click Me</button>
</div>
*/
const input = document.querySelector('#parent input');
const button = document.querySelecctor('#parent button');