From 04eb82dfda34f240660449164f8590ef4616b73c Mon Sep 17 00:00:00 2001 From: "mongodb-atlas-app-services[bot]" Date: Mon, 24 Jun 2024 18:10:48 +0000 Subject: [PATCH] Commit performed using Copy Push Files action --- .../function-context/context_callFunction.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 snippets/functions/function-context/context_callFunction.js diff --git a/snippets/functions/function-context/context_callFunction.js b/snippets/functions/function-context/context_callFunction.js new file mode 100644 index 0000000..f22f6d4 --- /dev/null +++ b/snippets/functions/function-context/context_callFunction.js @@ -0,0 +1,14 @@ +exports = async function(number1, number2){ + + // To call other named functions: + var result = context.functions.execute("sum", number1, number2); + + return result; +}; + +// This examples calls a function named "sum" that looks like this: +/* + exports = async function(number1, number2) { + return number1 + number2 + }; +*/ \ No newline at end of file