Why does the do while loop of javascript only loop once?

The

code is as follows, but not all of it is posted, because it is too long and miscellaneous:

//123
    let answer = 0;
    do{
        defaultPage();
        answer = require("readline-sync").question();
        if(answer == 1){
            return action1(input);
        }else if(answer == 2){
            return action2(input);
        }else if(answer == 3){
            return "";
        }else{
            return "Bad choice, please choose again!"
        }
    }while(answer == 1)   
}

the running result is as follows:

clipboard.png

Mar.22,2021

suggest that return


return will end the execution of the current function, so the loop also exits

.
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-1e4343d-65037.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-1e4343d-65037.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?