How do I write this code without using .innerHTML?
I am writing a JavaScript code where some characters of the string have a color and I want to display them through the HTML elements. I only want the 'abc' to be blue and no color change with 'def'. For…