# Typing effect p5js

**URL:** https://discourse.processing.org/t/typing-effect-p5js/36875
**Category:** Coding Questions
**Tags:** homework
**Created:** [May 13, 2022, 6:21pm UTC](https://discourse.processing.org/t/typing-effect-p5js/36875 "2022-05-13T18:21:48Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![luciaromancanivell](https://avatars.discourse-cdn.com/v4/letter/l/8edcca/32.png) [@luciaromancanivell](https://discourse.processing.org/u/luciaromancanivell)
#### Post date: [May 13, 2022, 6:21pm UTC](https://discourse.processing.org/t/typing-effect-p5js/36875/1 "2022-05-13T18:21:48Z")

</div>

Hello, Sorry to bother you again, I am in a programming class and for our homework trying to animate and make a typography effect that repeats itself but I am getting a bit confused, any help? Thank you!

````auto
var canvasWH = 400;
var palabra= "Hola!"; 
var pos = 0; 

function setup() {
  createCanvas(canvasWH, canvasWH);
  frameRate(10); 
}

function draw() {  
  textFont('Typewriter');
  textSize(12);
  text(palabra.substring(pos, pos + 1), pos++, canvasWH/2, canvasWH, 100);
  pos = +++

 if (pos > width) {
 pos = 0;
 }
}```
````

---

<div class="post-metadata">

### Author: ![svan](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@svan](https://discourse.processing.org/u/svan)
#### Post date: [May 13, 2022, 6:42pm UTC](https://discourse.processing.org/t/typing-effect-p5js/36875/2 "2022-05-13T18:42:56Z")

</div>

This answer was not sufficient? [https://stackoverflow.com/questions/72221785/typewriter-effect-p5-js](https://stackoverflow.com/questions/72221785/typewriter-effect-p5-js)
