About Optional Return Statements
In standard JavaScript, the return statement is required anytime you want to return a value from a function call. In DScript, it is optional if you want to return the value of the last expression in the definition's statement block. That is, the following code:
is the same as
This extension in DScript's lexical structure is required to allow DScript to support simple definitions. For example, you can replace the compound definition:
with the simple definition:
In the simple definition, return is implied.