DEV Community

Discussion on: Don’t excessively mutate the DOM. Here’s what you should do instead.

Collapse
 
devhammed profile image
Hammed Oyedele

Or better still use innerHTML but not advisable if input is coming from the user (XSS Attacks).