ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 40 - Certified Marketing Cloud Developer discussion

Report
Export

A developer wants to create an HTML table where rows will alternate background colors between white and red. The developer does not know how many rows will be sent within each email, and decides to use a loop and assigns the RowCount() of the table rows to the variable @numerator.

What is the recommended AMPscript logic to determine the background color of each table row within the loop?

A.
%%[IF DIVIDE(@numerator,2) =1 THEN SET @color = 'Red' ELSE SET @color = 'White' ENDIF]%%
Answers
A.
%%[IF DIVIDE(@numerator,2) =1 THEN SET @color = 'Red' ELSE SET @color = 'White' ENDIF]%%
B.
%%[IF SUBSTRING(DIVIDE(@numerator,2),1) = 1 THEN SET @color = 'Red' ELSE SET @color = 'White' ENDIF]%%
Answers
B.
%%[IF SUBSTRING(DIVIDE(@numerator,2),1) = 1 THEN SET @color = 'Red' ELSE SET @color = 'White' ENDIF]%%
C.
%%[IF @numerator/2 = 1 THEN SET @color = 'Red' ELSE SET @color = 'White' ENDIF]%%
Answers
C.
%%[IF @numerator/2 = 1 THEN SET @color = 'Red' ELSE SET @color = 'White' ENDIF]%%
D.
%%[IF MOD(@numerator,2) = 1 THEN SET @color = 'Red' ELSE SET @color = 'White' ENDIF]%%
Answers
D.
%%[IF MOD(@numerator,2) = 1 THEN SET @color = 'Red' ELSE SET @color = 'White' ENDIF]%%
Suggested answer: A
asked 23/09/2024
John Gevers
26 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first