The problem of multiple independent if statements in the js function?

I want to put multiple independent if statements in a function;
such as:

function(){
    if(){
        return true //if
    }else{
        return false //if
    };
    if(){
    
    }else{
    
    };
    if(){
    
    }else{
    
    };
};

if the above if returns false, the following code will not execute, and if it returns true, the function will continue to execute normally. Is that right? Ask the boss for advice!

Mar.12,2021

you ruturn, then leave this function. It says below that nothing will be executed, no matter what you return


if you meet the conditions, return, will end the function.


javascript does not have block-level scope, that is to say, your return in the if statement is the same as your return outside the if statement, so in essence, return causes the subsequent code not to be executed. I hope it can help you


. No matter true or false will not execute


this problem, you can write your own code test next time. Will deepen the understanding

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b9fbcd-2f4c7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b9fbcd-2f4c7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?