return is undefined JAVASCRIPT : <p>I have a question??.Why this function return value is undefined. i don't understand.</p>

<p>Help to solve me please.</p>

<p><a href="https://i.stack.imgur.com/wIb8N.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wIb8N.png" alt="enter image description here"></a></p>
