How do I return a value from a javascript function?

Use the return statement: return "mozilla. Org/en/Core_JavaScript_1.5_Reference/Statements/return Also, JavaScript is dynamically typed so you don't have to specify a type for the function, just return the variable.

7 jQuery equivalent: return $(" Split("")). Map(function(){ return this }).get(). Join(""); – Roatin Marth May 20 '10 at 14:00 @Roatin Marth: Thanks, that's really useful ;-) – Andy E May 20 '10 at 14:12 4 Not enough jQuery :P – Pablo Cabrera May 20 '10 at 15:32.

Function myFunction(myValue) { // do something // return to caller of function: return myValue; } var result = myFunction(myValue).

Also, JavaScript is dynamically typed so you don't have to specify a type for the function, just return the variable. Terms of service. Not the answer you're looking for?

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions