use variable in function returned by another function

Solutions on MaxInterview for use variable in function returned by another function by the best coders in the world

showing results for - "use variable in function returned by another function"
Charly
20 Jan 2017
1function firstFunction() {
2  // do something
3  return "testing 123";
4}
5
6var test = firstFunction();  // this will grab you the return value from firstFunction();
7alert(test);
8