Binding of Buttons in frappe

Hello everyone

I would like to ask how to bind buttons? I am planning to create a button and when I click the button, console log will appear?

Thank you.

@graspcipher

    cur_frm.add_custom_button(__("new Button"), function (){
        console.log("")
    });

I hope this solves your issue