I'm unsure why this isn't executing properly? It's so simple however I can't warp my head around it:
response = prompt(question.toLowerCase());
When I insert something into the prompt and I console.log it it seems to come back with uppercase letter that I added when I inserted the value into the prompt.
I want toLowerCase to convert any value into lowercase when submitted.
Any idea why this isn't working?
It's because you are setting lower caption of prompt, not the entered text. You have to use:
response = prompt(question).toLowerCase();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With