how to reset value of input field in javascript code example Example: how to reset input field in javascript document.querySelector('#counter').value = '';