Check out example codes for "what does leave do in mysql". It will help you in understanding the concepts better.

Code Example 1

-- MySQL

-- Leave statement is used to immediately exit the loop. 
[label]: LOOP
    ...
    -- terminate the loop
    IF condition THEN
        LEAVE [label];
    END IF;
    ...
END LOOP;

Learn ReactJs, React Native from akashmittal.com