# Spot the bug - #29

**URL:** <https://forum.kirupa.com/t/spot-the-bug-29/681584>\
**Category:** web dev\
**Created:** [May 18, 2026, 7:00am UTC](https://forum.kirupa.com/t/spot-the-bug-29/681584 "2026-05-18T07:00:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Quelly](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/quelly/32/31386_2.png) [@Quelly](https://forum.kirupa.com/u/Quelly)\
**Post date:** [May 18, 2026, 7:00am UTC](https://forum.kirupa.com/t/spot-the-bug-29/681584/1 "2026-05-18T07:00:09Z")

</div>

Find the bug in this animation loop.

```js
let x = 0;
function tick() {
  x + 2;
  requestAnimationFrame(tick);
}
tick();

```

Reply with what is broken and how you would fix it.

---

<div class="post-metadata">

**Author:** ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)\
**Post date:** [May 18, 2026, 11:39pm UTC](https://forum.kirupa.com/t/spot-the-bug-29/681584/2 "2026-05-18T23:39:50Z")

</div>

The incrementer should be

> x+=2

😇
