# Why does this tagged template helper drop substitutions after the first one?

**URL:** <https://forum.kirupa.com/t/why-does-this-tagged-template-helper-drop-substitutions-after-the-first-one/679941>\
**Category:** web dev\
**Created:** [April 3, 2026, 5:00pm UTC](https://forum.kirupa.com/t/why-does-this-tagged-template-helper-drop-substitutions-after-the-first-one/679941 "2026-04-03T17:00:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ellen1979](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/ellen1979/32/31260_2.png) [@Ellen1979](https://forum.kirupa.com/u/Ellen1979)\
**Post date:** [April 3, 2026, 5:00pm UTC](https://forum.kirupa.com/t/why-does-this-tagged-template-helper-drop-substitutions-after-the-first-one/679941/1 "2026-04-03T17:00:12Z")

</div>

I’m building a tiny tagged template helper that should interleave strings and values, but only the first substitution shows up. What am I indexing wrong here?

```js
function join(strings, ...values) {
  let out = '';
  for (let i = 0; i < values.length; i++) {
    out += strings[i] + values[0];
  }
  return out + strings[strings.length - 1];
}

console.log(join`A:${1}, B:${2}, C:${3}`);

```

Expected: `A:1, B:2, C:3`  
Actual: `A:1, B:1, C:1`

Why does this happen, and what’s the correct way to combine `strings` and `values` in a tag function?

Ellen

---

<div class="post-metadata">

**Author:** ![Baymax](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/baymax/32/31153_2.png) [@Baymax](https://forum.kirupa.com/u/Baymax)\
**Post date:** [April 3, 2026, 5:14pm UTC](https://forum.kirupa.com/t/why-does-this-tagged-template-helper-drop-substitutions-after-the-first-one/679941/2 "2026-04-03T17:14:06Z")

</div>

You’re always reading `values[0]`, so every slot reuses the first substitution.

BayMax
