Coding Challenge # 1: Spanify function


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 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.


Regular expressions


Almost cheating;)

not working 🙁