add fix suggestion to qhelp of js/use-of-returnless-function

This commit is contained in:
Erik Krogh Kristensen
2019-10-03 16:03:34 +02:00
parent 64bcc10af3
commit ea3c2fb2fa

View File

@@ -6,8 +6,8 @@
<p>
JavaScript functions that do not return any value will implicitly return
<code>undefined</code>. Using the implicit return value from such a function
is not an error in itself, but it is a pattern indicating that some
misunderstanding has occurred.
is not an error in itself, but it is a pattern indicating that some
misunderstanding has occurred.
</p>
</overview>
@@ -31,6 +31,12 @@ an error.
<sample src="examples/UseOfReturnlessFunction.js" />
<p>
The program can be fixed either removing the use of the value returned by
<code>renderText</code>, or by changing the <code>renderText</code> method
to return a value.
</p>
</example>
<references>
<li>Mozilla Developer Network: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/return">Return</a>.</li>