Friday, May 10, 2024
 Popular · Latest · Hot · Upcoming
149
rated 0 times [  154] [ 5]  / answers: 1 / hits: 16403  / 13 Years ago, fri, june 3, 2011, 12:00:00

In JavaScript functions, do I need to return something (true or false) ? So far, all the functions I wrote without returning anything work just fine. I'm just curious.


More From » function

 Answers
14

No; Javascript functions are not required to return a value.



If you call a function that doesn't return a value, you'll get undefined as the return value.


[#91885] Thursday, June 2, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
wilson

Total Points: 27
Total Questions: 93
Total Answers: 93

Location: Tajikistan
Member since Sun, Aug 29, 2021
3 Years ago
wilson questions
Tue, Aug 9, 22, 00:00, 2 Years ago
Wed, May 11, 22, 00:00, 2 Years ago
Wed, May 20, 20, 00:00, 4 Years ago
Wed, May 13, 20, 00:00, 4 Years ago
;