Difference between " " and ' '

ok… i’m coding AS now for about 3 weeks… but what i still dont get is when to use " " and when to use ’ ’ to separate text from the code…

why do i use e.g.

var x = ‘pic’ + a + ‘.jpg’;

but loadMovie(“pic1.jpg”,whatever);

i mean both times i separete strings from the code… so… why the difference?

hope someone could answer this question… cuz it really sucks when i’m doing some big project and have to think about such stupid syntax errors all the time…

thx in advance…

yours sincerly

one requires the shift key the other doesnt :stuck_out_tongue:

technically there is no difference (much at least). Both represent string values. You’ll probably see " more than ’ because its more common in writing to distinguish quoted text. So habitually, people shoot for using ".

Now, a difference you could point out is that in a " " string, you can use ’ without escaping it whereas to use another ’ in a ’ ’ string, you would need to use a slash to escape it to prevent it from being the ending quote. Ex:

myString = “That’s what I was talking about.”;
myString2 = ‘That’s what I was talking about.’;

same goes for " in a ’ ’ (or " ") string. The above example, however, shows how more useful " " can be for written text though as ’ is more common than ".

okok… i see… thx for the answer…