Understanding Uninitialized Variables syntax error

Tell us what’s happening:
After I run the code I keep getting. Syntax error on my c var saying unknown character but I’m using the quotes so I don’t understand if its me or the console that’s the issue please advise.

Your code so far


// Initialize these three variables
var a = 5;
var b = 10;
var c = “I am a”;

// Do not change code below this line

a = a + 1;
b = b + 5;
c = c + " String!";

Your browser information:

User Agent is: Mozilla/5.0 (iPad; CPU OS 12_1_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Mobile/15E148 Safari/604.1.

You’re using “bendy” quotes, like the ones around the word “bendy”. This typically happens when you copy code from a forum like this one when it hasn’t used a fixed-width font. You need straight quotes "like this"

1 Like

That’s the weird part I didn’t copy anything I’m using an iPad With a keyboard and that’s how the quotes appear the same with the onscreen keyboard.

I guess I cant use this then huh?

Sounds like the iPad is autocorrecting your quotes. I think there may be a setting that disables that, but my iPad is completely borked so I can’t say.

Thanks for the help. Wasn’t sure how well this question would go on here. I’m looking it up now I might have a solution

The smart punctuation setting for the keyboard just needs to be shut off “” all good now thanks for the help again.

1 Like