Dynamic text rewriting

Hi !

I saw some websites with a cool feature: rewriting all or part of a text with js ( a part example) but can I do this in js without an infinity loop that'll completely slow down browser performances?

I would love to implement my own version but have no clue on how.
Thanks for your help !

Did you find this post useful? Show some love!

I would use setInterval() to run your function every x seconds! Here's a reference on the typewriter effect w3schools.com/howto/howto_js_typew....

Exactly what I needed! I feel ashamed of not having found that ^ "
Thank you very much, I finally added it to my site!

Classic DEV Post from May 5

Everything That's Not Tested Will Break

The pitfalls of not testing or the benefits of doing it.

READ POST
Follow @stealthmusic to see more of their posts in your feed.
Pierre Bouillon
Developer, student, tech enthusiast and coffee junky.
Trending on dev.to
Js Modules are Now supporting in Browsers
#javascript #module #webdev #node
This confusion in JavaScript😐🤔😅
#javascript #react #webdev #beginners
Startup CliX: Serverless Pusher Contest Entry written in JavaScript
#pushercontest #javascript #aws #game
How to Build your First Offline Webpage
#pwa #webdev #javascript #beginners
Creating A Real-World CLI App With Node
#node #cli #javascript
Optional (null-safe) in javascript
#javascript #optional #webdev #node
Vue.js Quickstart Tutorial by @code_wonders
#vue #javascript #node #codenewbie
How Destructuring Works in JavaScript💢💢💢
#webdev #beginners #react #javascript