0
Vice versa..
If I have, this function: function f(){return "text";} And wanted to make a function that writes (Print) what 'f' returns , I will type: function f(){return "text";} function ff(){document.write( f() );} But....What if I wanted to make a function that returns what another function writes? That is: function f(){document.write( "text" );} function ff(){ ...... return ...... ;} Is there a method?
1 ответ
+ 1
What is your plan in relation to this? I just thought it's redundant when a function prints something and return that something as well. Because if it returns that something, then the something (that was returned) can be printed elsewhere.
Maybe you can improve your chances for answers if you add more context on this thoughts ...