Announcement

Collapse
No announcement yet.

when to use return....

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • when to use return....

    Hi all,

    Are there any specific rules about when to use the return command in a function. I have been reading some of the past forum posting and it is not clear if you are not returning a value if the return is needed.

    Any comments on this would be appreciated.
    "Make it a great day"
    [email protected]

  • #2
    Hello perfectinglife,

    The return statement is a core element to the JavaScript language, which is the basis for EFS. It simply returns execution to the calling function when used by itself. Any code after the return statement will not be executed. It is not required to add a return statement to the end of a function, but it is recommended. If the function needs to return some data back to the calling function, the return statement is what sends back that data. There is only one exception to the return statement in EFS. Data returned by the return statement in function main() communicates to the Advance Chart any data series to be plotted on the chart. Hope this helps.
    Jason K.
    Project Manager
    eSignal - an Interactive Data company

    EFS KnowledgeBase
    JavaScript for EFS Video Series
    EFS Beginner Tutorial Series
    EFS Glossary
    Custom EFS Development Policy

    New User Orientation

    Comment

    Working...
    X