HTML Input Field to Javascript Function to Console
<p>I'm trying to echo the input from the input field to the console but can't print the input outside the HTML field, here an example :</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>function getInput(input) {
 var input = document.getElementById("EchoInput").value;
  console.log(input);
}

//These are the "external" inputs I'd like to print in the console.
getInput("test");
getInput("one");
getInput("two");</code></pre>
<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;input type="text" id="EchoInput" onblur="getInput()"&gt;</code></pre>
</div>
</div>
</p>

<p>As you can see it does work using <code>document.getElementById("EchoInput").value;</code> but when testing the function with "test", "one" and "two" inputs it doesn't work.</p>

<p>I'm super newb with code but believe there's a problem of variable scope here and that <code>getElementById().value;</code> is taking over the bottom three functions. </p>

<p>The other alternative to print the bottom functions is by removing the event handler, but makes the input for the field <code>undefined</code> which defeats the purpose.</p>

<p>Is there a way to accept both inputs ?</p>

<p>Thanks a lot for your help, I've looked for answers here and found solutions using JQuery or similar advanced ones I didn't understand, apologies if it's a recurring issue.</p>

<p>Cheers.</p>

<p>K.</p>