function firstFunction() { // do something return "testing 123"; } var test = firstFunction(); // this will grab you the return value from firstFunction(); alert(test);