canmove, Confirmed users
737
edits
| Line 75: | Line 75: | ||
=== <code>constructor</code>, <code>function</code>, and <code>method</code> Syntax === | === <code>constructor</code>, <code>function</code>, and <code>method</code> Syntax === | ||
The syntax for <code>function</code> and <code>method</code> types is identical: the only difference is that <code>method</code> components are nested inside <code>class</code> or <code>property</code> components, whereas <code>function</code> components aren't. The syntax for <code>constructor</code> is identical, except that it must be nested inside a <code>class</code> component and must not return a value. | The syntax for <code>function</code> and <code>method</code> types is identical: the only difference is that <code>method</code> components are nested inside <code>class</code> or <code>property</code> components, whereas <code>function</code> components aren't. | ||
The syntax for <code>constructor</code> is identical, except that it must be nested inside a <code>class</code> component and must not return a value. | |||
==== Parameters ==== | ==== Parameters ==== | ||