About 3,610,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. How to return values in javascript - Stack Overflow

    Feb 23, 2017 · You can return an array, an object literal, or an object of a type you created that encapsulates the returned values. Then you can pass in the array, object literal, or custom …

  3. Function return values - Learn web development | MDN

    Apr 28, 2025 · Some functions don't return a significant value, but others do. It's important to understand what their values are, how to use them in your code, and how to make functions …

  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 execution.

  5. How Do I Return A Value From A JavaScript Function? - James …

    In this comprehensive guide, we’ll explore the ins and outs of returning values from JavaScript functions, including the return statement, multiple return values, and best practices.

  6. How to Return a Value in JavaScript - ThoughtCo

    May 6, 2025 · JavaScript passes a value from a function back to the code that called it by using the return statement. The value to be returned is specified in the return. That value can be a …

  7. 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 argument.

  8. How to Return Values of a Function in JavaScript | Delft Stack

    Feb 2, 2024 · The function can return anything like an array, literal object, string, integer, a boolean value, or an object of a custom type you create that encapsulates the return values.

  9. javascript - Functions that return a function: what is the …

    It defines/creates function b() and then returns the function b () as its return value. Initially var s = a(); calls a() and stores its return into variable s; s now holds function b().

  10. Return a Value from a JavaScript Function - Online Tutorials …

    To return a value from a JavaScript function, use the return statement in JavaScript. You need to run the following code to learn how to return a value −. <head> <script> function …

  11. Some results have been removed
Refresh