Home > front end >  return
return

Time:10-22

Why in front of a don't return, the great god solve

CodePudding user response:

Don't understand what you ask?
No fun in the first code function call

CodePudding user response:

The meaning of return is the return, need to return, return the result don't need to don't write

CodePudding user response:

reference 1/f, the sky wave response:
don't understand what you ask?
No fun in the first code function call ah

To use, use the console. You won't have to return the log

CodePudding user response:

reference 1/f, the sky wave response:
don't understand what you ask?
No fun in the first code function call ah

To use, use the console. You won't have to return the log

CodePudding user response:

Function is not running, you don't have to be

CodePudding user response:

reference 5 floor weixin_45747359 reply:
function is not running, you don't have to is it
has nothing to do with whether to run, when you have a return value is a function to write the return no you don't have to write, don't write is the default returns undefined

CodePudding user response:

The meaning of the original poster is probably wondering, why in front of a return, print (the console. The log ()) has a value, behind a no return, executive function, print (the console. The log ()) to have value, first of all, in front of you, that is a global variable, then fun method didn't perform again, and so the execution result is 1, the latter, is with the function of a different kind of writing, the declarative function of writing, no matter what kind of writing, all you need to perform, as to whether to write the return method, depending on your needs, you want this method returns a value, and return, don't need to approach the return value, will not return to go,