What is the correct DataWeave code to define the newProdCode function?


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?
A . fun newProdCode{itemID: Number, productCategory: String) ―> "PC-" ++ productCategory ++ (itemID as String)
B . fun newProdCode(itemID: Number, productCategory: String) = "PC-" ++ productCategory ++ (itemID as String)
C . function newProdCode(itemID: Number, productCategory: String) = "PC-" ++ productCategory ++ (itemID as String)
D . var newProdCode(itemID: Number, productCategory: String) -> "PC-" ++ productCategory ++ (itemID as String)

Answer: D

Leave a Reply

Your email address will not be published.