I was used to do programming using python but I am using javascript for some project now. In python, OOP concept was little easy than javascript which I am reading right now. That being said, I am not so comfortable right now using javascript object and prototypes. In the meanwhile, can I achieve the following without using object? I am not a pure programmer (always took it as hobby) so please bear with me:
function func1(arg1){
does item..1..for eg...var result=arg1*2;
does item..2..for eg...var resultSq=arg*arg;
......
}
I want other function, say func2 which when calls func1; funct1 responds just by performing item...1 and returning the result.
In other words, I want to detect who called the function and have if statements to change the execution Sorry if it is too simple.