MCD - Level 1 Exam QuestionsBrowse all questions from this exam

MCD - Level 1 Exam - Question 38


Which keyword do you use to create a new function in DataWeave?

Show Answer
Correct Answer: B

The correct keyword to create a new function in DataWeave is 'fun'. The syntax to define a function is 'fun myFunction(param1, param2, ...) = <code to execute>'. This is documented in the Mulesoft official documentation for DataWeave functions.

Discussion

1 comment
Sign in to comment
AquawormOption: B
Feb 21, 2022

To define a function in DataWeave use the following syntax: fun myFunction(param1, param2, ...) = <code to execute> https://docs.mulesoft.com/dataweave/2.4/dataweave-functions