Coding Challenge # 1: Spanify function


Exercise

The objective of this exercise is to create a function Spanify () which will create a word-by-word animation effect. The purpose of this function is to convert the HTML structure of the title.

this is a title

By surrounding each word with .

This East a title

You can use this CodeSandbox template https://codesandbox.io/s/challenge-spanify-4oxrr?file=/src/index.js to test your code (refresh in the right part to test your solution).
You can submit your solution here (only one message per person and the solution can be a jsfiddle / codesandbox / github link ...)

Your solutions

Many of you participated and I decided to group the responses into several categories.

Text

Regular expressions

Dom

Almost cheating;)

not working 🙁