title: I get the undefined in javascript
body: <p>Can anyone expain why i get undefined?</p>
  <pre><code>function besked(input) {
      let inputstring = String(input)
      result = &quot;&quot;;
      for(i = 0; i &lt; inputstring.length; i+=2 )
      {
      result += inputstring[i];
      }
  }
  console.log(besked(&quot;HHeljw OirnFgaeCrs&quot;))
  </code></pre>