Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bradtraversy/javascript-sandbox
/ subtract
Function
subtract
03-functions-scope/01-function-basics/script.js:22–26 ·
view source on GitHub ↗
(num1, num2)
Source
from the content-addressed store, hash-verified
20
21
// Returning a value
22
function
subtract(num1, num2) {
23
return
num1 - num2;
24
25
console.log(
'After the return'
);
26
}
27
28
// Assign the returned value to a variable
29
const
result = subtract(10, 2);
Callers
1
script.js
File · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected