/* Accept color input from user and then apply it to the variable named "message". */
<script type="text/javascript">
var textcol, message = "Nice color choice";
textcol=window.prompt("Enter a color:");
document.getElementById(message).style.color = textcol;
document.writeln(message);
</script>
I think you want to do like this
<script type="text/javascript">
var textcol,
message = 'Nice color choice';
textcol = window.prompt('Enter a color:');
document.writeln(`<span style="color:${textcol}">${message}</span>`);
</script>