Code Runner Widget
Last updated
Last updated
Fields besides widget_id
and output_name
code
string (Required)
A stringified code snippet. It should contain one or more function definitions.
"function main(params) {\n const { a, b } = params;\n const sum = a + b;\n return sum;\n}"
function
string (Optional)
The name of the function you want to call in the code snippet. Defaults to main
.
'main'
params
Object (Optional)
The parameters you pass to the calling function.
‘Hello.’