79093445

Date: 2024-10-16 09:49:02
Score: 0.5
Natty:
Report link

I think what you're trying achieve can simply be done by using CSS only.

.container span:after {
  content: '|';
}

.container span:last-child:after {
  content: '';
}
<div class='container'>
  <span>a</span>
  <span>b</span>
  <span>c</span>
</div>

<div class='container'>
  <span>a</span>
</div>

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Naeem Akhtar