Skip to content
Advertisement

Proper way of writing $(this).text().match(r) into vanilla JS?

I have the following function written in jQuery which I would like to convert to javascript but I couldn’t find a proper way so far.

JavaScript

I rewrote it this way:

JavaScript

Advertisement

Answer

JavaScript
JavaScript
Advertisement