如何在每 3 次重复后添加一个“div”?
这是我的数组:
[
client : "name",
client : "name",
client : "name",
client : "name",
client : "name",
client : "name",
client : "name",
client : "name",
client : "name",
]
预期的结果是:
<div>name</div>
<div>name</div>
<div>name</div>
<div class="clear"></div>
<div>name</div>
<div>name</div>
<div>name</div>
<div class="clear"></div>
<div>name</div>
<div>name</div>
<div>name</div>
<div class="clear"></div>