-
I am making a guessing game, and the first thing the user does is input their name. I called this variable fname, and then I made the first letter uppercase and the rest lowercase by making a var res=fname.charAt(0).toUpperCase() + fname.slice(1);. When I try to reference res in subsequent functions, I get “Unexpected Identifier” and startGame() is not defined in console. What did I do wrong? here is my code: https://github.com/jossg14/ap-computer-science-principles/blob/master/finalguessingGame.html |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Programming is absolutely unforgiving.
You are missing the plus sign between “,” and guess. |
Beta Was this translation helpful? Give feedback.
Programming is absolutely unforgiving.
You are missing the plus sign between “,” and guess.