MCPcopy 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
22function subtract(num1, num2) {
23 return num1 - num2;
24
25 console.log('After the return');
26}
27
28// Assign the returned value to a variable
29const result = subtract(10, 2);

Callers 1

script.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected