Sorry if I\'ve made mistakes writing this post. I\'m new here and I don\'t know how this works, hope I learn quick. I am also new at JavaScript.
So the question is:
The way you are implementing this logic I would suggest a switch statement for readability like such:
switch (codePrompt){
case "switch()":
{
//Handle case
break;
}
case "switch(background)":
{
//Handle Case
break;
}
case "blur()":
{
//Handle Case
break;
}
default :
{
alert("Wrong command, try again.");
console.log("Wrong command, try again.");
}