# The function UP\_ARROW and DOWN\_ARROW dosen't work at p5.js web

**URL:** <https://discourse.processing.org/t/the-function-up-arrow-and-down-arrow-dosent-work-at-p5-js-web/34584>\
**Category:** Coding Questions\
**Created:** [January 11, 2022, 7:27pm UTC](https://discourse.processing.org/t/the-function-up-arrow-and-down-arrow-dosent-work-at-p5-js-web/34584 "2022-01-11T19:27:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MrPrumucena](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@MrPrumucena](https://discourse.processing.org/u/MrPrumucena)\
**Post date:** [January 11, 2022, 7:27pm UTC](https://discourse.processing.org/t/the-function-up-arrow-and-down-arrow-dosent-work-at-p5-js-web/34584/1 "2022-01-11T19:27:42Z")

</div>

I’m making the game Pong on p5.js and i’m trying to move the racket using the function:

function (keyIsDown(UP\_ARROW)){  
yRacket -= 10;  
}  
function (keyIsDown(DOWN\_ARROW)){  
yRacket += 10;  
}

But it dosen’t work, the text UP\_ARROW is red and i don’t know what to do… Help, plz!

---

<div class="post-metadata">

**Author:** ![jafal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jafal/32/19112_2.png) [@jafal](https://discourse.processing.org/u/jafal)\
**Post date:** [January 11, 2022, 7:37pm UTC](https://discourse.processing.org/t/the-function-up-arrow-and-down-arrow-dosent-work-at-p5-js-web/34584/2 "2022-01-11T19:37:25Z")

</div>

hi

> **[reference | p5.js](https://p5js.org/reference/#p5/keyCode)**
>
> p5.js a JS client-side library for creating graphic and interactive experiences, based on the core principles of Processing.

> **[p5.js Web Editor](https://editor.p5js.org/2sman/sketches/rkGp1alib)**
>
> A web editor for p5.js, a JavaScript library with the goal of making coding accessible to artists, designers, educators, and beginners.

---

<div class="post-metadata">

**Author:** ![jafal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jafal/32/19112_2.png) [@jafal](https://discourse.processing.org/u/jafal)\
**Post date:** [January 11, 2022, 8:05pm UTC](https://discourse.processing.org/t/the-function-up-arrow-and-down-arrow-dosent-work-at-p5-js-web/34584/3 "2022-01-11T20:05:53Z")

</div>

> **[Can we make Pong in less than a 100 lines of Javascript?](https://dev.to/codesphere/can-we-make-pong-in-less-than-a-100-lines-of-javascript-3ah1)**
>
> The original Pong took Atari over 3 months to complete back in 1972. The classic arcade game was one...
