I am trying to change the color of the function swapFE() below and I can\'t figure out how to write it. I was told to change the color of the phrase node to the color value
I am showing with an example of adding random color. You can write this way
var r = Math.floor(Math.random() * 255);
var g = Math.floor(Math.random() * 255);
var b = Math.floor(Math.random() * 255);
var col = "rgb(" + r + "," + g + "," + b + ")";
parent.childNodes[1].style.color = col;
The property is expected as a string