Stumped on typewriter effect
I have some JavaScript where I need to create a typewriter effect that types and then backspaces. I've gotten something to work on this codepen: https://codepen.io/vince1444/pen/xxNZKQE?editors=1111
The problem is, I need to do this for an array of words, and this is really stumping me. It seems like promises are key here, but I can't get my promises to work correctly.
I have a work in progress codepen here: https://codepen.io/vince1444/pen/oNRbNGd?editors=1111
I'm able to print out the first letter in each word sequentially so far...
Edit: I was able to get the all the words printing sequentially now, but I still need to implement backspacing...
6 Replies
Ay! I think I figured it out: https://codepen.io/vince1444/pen/oNRbNGd?editors=1111
I'd love feedback on making this cleaner though -- all the times I've worked with promises in depth it's made my head spin and I feel like I'm no closer to learning how they really work
Oh dang! It doesn't loop though 🫣
here i did it recursively
--edit: removed pen, see backup below
I don't have time to fix it right now, but I'm so close! edit: link probbly better: https://codepen.io/D10f/pen/vYwLEoK
Omg great solutions guys, I still have so much to learn
Love the OOP approach too!
I removed the pen, so here a backup for future reference
ty! already forked