javascript assign value to input using name

JavaScript
document.querySelector('input[name="myInput"]').value = 'Whatever you want!';

Source

Also in JavaScript: