return false the same as return?

前端 未结 8 1529
走了就别回头了
走了就别回头了 2020-12-01 03:33

Is

return false 

the same as:

return
相关标签:
8条回答
  • 2020-12-01 04:10

    It's returning undefined it's commonly used to break execution of the following lines in the function

    0 讨论(0)
  • 2020-12-01 04:11

    No. They are not the same. Returning false from a function returns the boolean false, where a void return will return undefined.

    0 讨论(0)
提交回复
热议问题