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

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.

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments