This might give a better idea, replace in paragraph, ' ==> " and highlight it
for (let i=0; i<orgString.length;i++) {
changeVal.push("color:#" + Math.floor(Math.random() * 16777216).toString(16))
let spanStart = <span style={changeVal[i]}> '"' </span>
if (orgString.charAt[i] === "'") {
let newSubstring = orgString.substring(0,orgString.charAt[i]);
orgString = newSubstring + spanStart + orgString.substring(orgString.charAt[i+1], orgString.length);
}
}
Trying to change the multiple values, so concatenating in same string and render it once entire string is iterated
But getting output with [object Object] where concatenated HTML element