Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^3: Hope a subroutine will return undef by default

by qj1020 (Initiate)
on Feb 12, 2014 at 22:07 UTC ( [id://1074704]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Hope a subroutine will return undef by default
in thread Hope a subroutine will return undef by default

You are right, javascript does this. "return ;" in the middle of a function has the same return value as the case when execution of the function goes the end of the function body without a return statement --- both cases return "undefined" or null. No surprises.
  • Comment on Re^3: Hope a subroutine will return undef by default

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1074704]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (3)
As of 2024-04-19 01:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found