Declare String Variables need help

Declare String Variables need help
0.0 0

#1

Tell us what’s happening:

When i click run test nothing seems to happen also notice that my strings don’t seem to change to red the way the ones in the example do. I have tried this on both safari and chrome on my iPad Pro. I have also tried using both double quotes”” and single quotes’’ and neither seem to work. I am having a similar issue in the 2 lessons after this one as well.

On a side note. When doing the decriment a variable in java script lesson i had an issue where when typing myVar—; was becoming one solid line rather than two - - symbols.

So im not sure if it is just something weird that is happening because i am on an ipad or what the case may be.

Thank you for your time and help.

Your code so far


// Example
var firstName = "Alan";
var lastName = "Turing";

// Only change code below this line


var myFirstName = “cory”;
var myLastName = “pelletier”;

Your browser information:

User Agent is: Mozilla/5.0 (iPad; CPU OS 11_4_1 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) CriOS/67.0.3396.87 Mobile/15G5054c Safari/604.1.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/declare-string-variables


#2

You can only use straight double quotes or straight single quotes. You are using some kind of curly quotes for your code. Look at the quotes in the Example code (shown below). Those are the correct type.

// Example
var firstName = "Alan";
var lastName = "Turing";

#3

Okay thank you that did the trick. For some reason when i use my keyboard it changes the way the quotes work. It worked fine with the touchscreen quotes though. I will try this on the other lessons as well and see if that helps. I am using a Logitech keyboard just for reference.

Thank you for your time and help
Cory


#4

Okay im having a bit of an issue with this quotation mark thing. Ive been able to solve the double quote issue by using the touch screen keyboard rather than a peripheral one but on another lesson where i am required to use both single and double quotes my single quotes are not working properly regardless of which keyboard i use. Do you have any ideas for a solution to this or do i just need to use an actual computer rather than an iOS device?


#5

I don’t know what levels of control over peripherals iOS gives you or whether different keyboards would behave differently. I do know that Android devices have several “programmer keyboard” apps. I assume that Apple has similar apps.


#6

You have to disable smart quotes: