MuleSoft
MCD-LEVEL-1 · Question #73
A function named newProdCode needs to be defined that accepts two input parameters, an integer value for itemID and a string value for productCategory, and returns a new product code. What is the…
The correct answer is B. fun newProdCode(itemID: Number, productCategory: String) = "PC-" ++ productCategory ++. You've hit your limit · resets 5am (America/New_York)
Applying DataWeave Transformations
Question
A function named newProdCode needs to be defined that accepts two input parameters, an integer value for itemID and a string value for productCategory, and returns a new product code. What is the correct DataWeave code to define the newProdCode function?
Options
- Afun newProdCode{itemID: Number, productCategory: String) --> "PC-" ++ productCategory ++
- Bfun newProdCode(itemID: Number, productCategory: String) = "PC-" ++ productCategory ++
- Cfunction newProdCode(itemID: Number, productCategory: String) =
- Dvar newProdCode(itemID: Number, productCategory: String) ->
How the community answered
(21 responses)- A5% (1)
- B81% (17)
- C10% (2)
- D5% (1)
Explanation
You've hit your limit · resets 5am (America/New_York)
Topics
#DataWeave function#fun keyword#type annotations#function definition
Community Discussion
No community discussion yet for this question.