I have a string
var inputStr = 'xzy'; var match = 'x'; I have to highlight the str from the inputStr. I was trying something like this
var inputStr = "vikram"; var match = 'v'; var new_str = str.split(''); for(var i = 0;i<=new_str.length;i++) { if(match == new_str[i]) { var x_str += ''//code to bold that charachter and add in the array } } Can any one please help me fix this
Thanks in advance
string.replace.