Getting a button to interact with an input to land in console

Using an html file i have created a and and I’m trying get the them to interact using a separate java script file.
I am using the console.log to check if my input is being received and pushed to the console by the button.

This is the body of the HTML file.

const myInput = document.getElementById("myInput");

function guess(myInput) {
  console.log(myInput);
}

myInput.addEventListener("click", document.getElementById("myInput"))
<h1 id="random">Random Number guesser</h1>
<h2>Guess a number below between 1 - 100.</h2>
<div>
  <button id="button" onclick="guess()">Guess!</button>
  <input id="myInput" type="text">
</div>`your text`
<script src="config.js"></script>