This is an assignment for school, and I need to do the following to the code below: Modify the getCompanyName() function in the following code so that it returns the company name to another calling function. Also, add statements after the getCompanyName() function definition that call the getCompanyName function and assign the return value to a variable named retValue. Finally, print the contents of the retValue variable. Here is the code: <HTML> <HEAD> <TITLE>Company Name</TITLE> <PRE> <SCRIPT type="text/javascript"> <!-- HIDE FROM INCOMPATIBLE BROWSERS function getCompanyName() { var companyName = "Course Technology"; } // STOP HIDING FROM INCOMPATIBLE BROWSERS --> </SCRIPT> </PRE> </HEAD> <BODY> </BODY> </HTML> This will probably be easy for most of you... but I just started this stuff today. Any help would be greatly appreciated because this is due tomorrow. Thanks, Spyder
function getCompanyName() { var companyName = "Course Technology"; return companyName; } function test() { var retval = getCompanyName(); document.write(retval); }