Question: Hello, I need help styling my javascript error messages in strictly javascript . My professor does not want me to mix HTML in my js
Hello, I need help styling my javascript error messages in strictly javascript. My professor does not want me to mix HTML in my js code. How can I style my error messages with strictly javascript?
heres my current code that is breaking the division of concerns by using html in my js code:
JAVASCRIPT CODE:
if (title === "") { errorMessage += "
CSS CODE:
.error-message { color: red; }
thank you!
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
