How do you understand each return in the following code?

clipboard.png
can you explain how this code works? In particular, how are several return implemented?


execute:

  1. If specId is undefined (or other variables that are No ), then false is returned.
  2. for-of traverses the list array and returns that item
  3. if the condition is met
  4. indicates that none of the above array meets the condition, and returns false

transform

  

if you don't understand the meaning of these return, you need to hurry back and take a look at the basics of js

Menu