Files
qiming/qiming-run_code_rmcp/fixtures/rfunction_test1.js
2026-06-01 13:43:09 +08:00

20 lines
510 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// 使用类型注解时应确保使用的是支持该特性的环境或编译器(如 TypeScript
function add(input) {
console.log("test Add", input.a, "+", input.b);
// 简单的字符串输出,不使用外部模块
console.log("Hello from JavaScript!");
return input.a + input.b;
}
function handler(input) {
console.log("输入参数:", JSON.stringify(input));
let a = add(input);
console.log("计算结果=" + a);
return {
message: a,
};
}