About 526,000 results
Open links in new tab
  1. JavaScript return Statement - W3Schools

    The return statement stops the execution of a function and returns a value. Read our JavaScript Tutorial to learn all you need to know about functions. Start with the introduction chapter about …

  2. return - JavaScript | MDN - MDN Web Docs

    Mar 13, 2025 · In a plain function, the call to that function evaluates to the return value. In an async function, the produced promise is resolved with the returned value. In a generator …

  3. How to return values in javascript - Stack Overflow

    Feb 23, 2017 · I have a javascript function: function myFunction(value1,value2,value3) { //Do stuff and value2=somevalue2 //to return value3=somevalue3 //to return } function call in Code: ....

  4. JavaScript Return Statement - GeeksforGeeks

    Feb 7, 2025 · The return statement in JavaScript is used to end the execution of a function and return a value to the caller. It is used to control function behaviour and optimise code …

  5. JavaScript Return Statements - ref.coddy.tech

    Learn about JavaScript return statements, their syntax, usage, and best practices. Discover how to effectively use return statements in functions to output values and control program flow.

  6. JavaScript Return - Function Return Values - ZetCode

    Apr 16, 2025 · Functions in JavaScript can return any valid value: numbers, strings, objects, arrays, other functions, or even no value (undefined). The return statement is optional; …

  7. How do I return a value from a JavaScript function? - James Parker

    Sep 3, 2023 · Using the return Statement. In JavaScript, you use the return statement to specify what a function should output. The return statement terminates the function’s execution and …

  8. JavaScript Functions - W3Schools

    If the function was invoked from a statement, JavaScript will "return" to execute the code after the invoking statement. Functions often compute a return value . The return value is "returned" …

  9. Functions - JavaScript | MDN - MDN Web Docs

    Mar 22, 2025 · The function square takes one parameter, called number. The function consists of one statement that says to return the parameter of the function (that is, number) multiplied by …

  10. JavaScript Return Statements - freeCodeCamp.org

    Jan 21, 2020 · When a function return s a value, the value can be assigned to a variable using the assignment operator (=). In the example below, the function returns the square of the …

  11. Some results have been removed
Refresh