0
Why bother with the return of a variable that never gets document.write?
2 Antworten
0
Because you may want to do more with a variable than write it to the screen.
0
I'm not the first to say it, but it's worth repeating: You can do many things other than send what's RETURNed to document.write() or such.
Imagine if you had a sweet, streamlined function that checked pre-set boundaries. You could call your boundary-checking function with the parameter of an object and receive a RETURN boolean whether the object is in-bounds or not. This is just an example -- you can Call & Return Functions anyway you desire.