nerdexam
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)
  • A
    5% (1)
  • B
    81% (17)
  • C
    10% (2)
  • D
    5% (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.

Full MCD-LEVEL-1 Practice