JSFiddle - React, Tailwind, and code Playground

by sathyamoorthi

JavaScript

var target = "Thanks For Looking This Problem";
var phrase = ["anks", "for", "king T"];

for(var indx = 0; indx < phrase.length; indx ++)
{
   target = target.replace(new RegExp(phrase[indx], "gi"), "~~~" +           phrase[indx] + "```");
}

alert(target);