# For loops - value becoming value2

**URL:** https://forum.makecode.com/t/for-loops-value-becoming-value2/522
**Category:** Arcade
**Created:** [September 7, 2019, 6:08pm UTC](https://forum.makecode.com/t/for-loops-value-becoming-value2/522 "2019-09-07T18:08:47Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![kjw](https://avatars.discourse-cdn.com/v4/letter/k/e79b87/32.png) [@kjw](https://forum.makecode.com/u/kjw)
#### Post date: [September 7, 2019, 6:08pm UTC](https://forum.makecode.com/t/for-loops-value-becoming-value2/522/1 "2019-09-07T18:08:47Z")

</div>

I’ve got some `for` loops which sometimes change and sometimes do not change if code written in `Blocks` goes to `JavaScript` mode and back. When multiple `for` loops with `value` are used, _sometimes_ these get converted into unique names, e.g. `value2` and `value3`. I have a case where the “unique-ifier” has done a half-job and performed a partial search-and-replace on the usage inside the `for` loop.

It would be interesting to hear if others have experienced this and if anyone has worked out when this bug strikes?

---

<div class="post-metadata">

### Author: ![kjw](https://avatars.discourse-cdn.com/v4/letter/k/e79b87/32.png) [@kjw](https://forum.makecode.com/u/kjw)
#### Post date: [September 7, 2019, 7:14pm UTC](https://forum.makecode.com/t/for-loops-value-becoming-value2/522/2 "2019-09-07T19:14:56Z")

</div>

Could this be partly related to using the `sprite x` block on a tile? That’s been working for a while but that’s what failed to convert from `value` to `value3`.
