how to return true or false in javascript function

how to return true or false in javascript function

<script type="text/javascript">
    $("#btnSubmit").click(function () {
        var txtEmail1 = $("#txtEmail").val();        
        if (txtEmail1 == '') {
            txtEmail.focus();
            return false;
        }
        else if (txtPassword1 == '') {            
            return true;
        }              
    });
</script>

2020-02-12