On click of a button i'm calling this function
toggleFunction(){
//Do something here to toggle between function A and function B
}
A(){} //Call this first
B(){} //Call this after
How can i implement in javascript in a simple way?
Thanks a lot in advance!