mcd-level-1 question 201 discussion

View all MuleSoft Certified Developer - Level 1 (Mule 4) Exam here
back to mulesoft forum

Question 201

Refer to the exhibits.

What payload and variable are logged at the end of the main flow?

A.
[[5, 10, 15, 20], 1]
B.
[[5, 10, 15, 20], 5]
C.
[[Req5, Req10, Req15, Req20], 5]
D.
[Req5Req10,Req15Req20, 5]

Answer:

B


Explanation:
Correct answer is [[5, 10, 15, 20], 5]
Key thing to note here is that any changes made to payload in for each loop are not available outside
for each scope where as variable value updated in for each loop is visible out side for each loop too.

User Votes:
Discussions
0 / 1000
d.abbas
11 months ago

Explanation is correct, see here similar question: https://www.friendsofmulesoft.com/en/news/exam_questions/exam_question_ms_21_062_for_mulesoft_certified_developer_mcd_level_1/106/