So, I was looking how to do something similar to Stackoverflow's code thing:
e.g. The "var" is colored and "test" isn't
var test
How would I write a JavaScript function to do this?
This is what I tried
if ("var") {
document.getElementByTagName("code").style.color="purple";
}
So when the text "var" is in a "code" element, it turns JUST "var" purple.