1. Home
  2. Javascript
  3. Return

Return statement finishes function execution and can output a value.

#javascript
function foo(a, b){
    return a + b;
}
copy
Full Javascript cheatsheet
NordVPN NordVPN