I need help with the layout of some code.
Can I somehow call function3
with an argument from both function1
and function2
?
I can't make function2
to be a nested function since it is activated by a onclick
.
Thank you!
function 1(){
//This function activates when a file is imported and calculates one variable from an imported document.
}
function 2(){
//The function activates from an "onclick()" this function calculates another variable.
}
function 3(){
//calculation of the two variables
}