MCQs > IT & Programming > Shopify > Which code is correct of Shopify cycle iteration to simplify?

Shopify MCQs

Which of the following code is correct of Shopify cycle iteration to simplify?

Answer

Correct Answer: {% for i in (1..20) %} <div class="{% if forloop.index < 5 %} class1{% endif %}{% if forloop.index >=5 and forloop.index < 9 %} class2{% endif %}{% if forloop.index >=9 and forloop.index <13 %}class3{% endif %}">class{{ forloop.index }}</div> {% endfor %}

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Shopify Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Shopify Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it