# Difference between " " and ' '

**URL:** <https://forum.kirupa.com/t/difference-between-and/63701>\
**Category:** Uncategorized\
**Created:** [September 9, 2004, 9:24am UTC](https://forum.kirupa.com/t/difference-between-and/63701 "2004-09-09T09:24:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fightalone](https://avatars.discourse-cdn.com/v4/letter/f/22d042/32.png) [@fightalone](https://forum.kirupa.com/u/fightalone)\
**Post date:** [September 9, 2004, 9:24am UTC](https://forum.kirupa.com/t/difference-between-and/63701/1 "2004-09-09T09:24:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 9, 2004, 10:05am UTC](https://forum.kirupa.com/t/difference-between-and/63701/2 "2004-09-09T10:05:25Z")

</div>

one requires the shift key the other doesnt 😛

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 ".

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 9, 2004, 1:55pm UTC](https://forum.kirupa.com/t/difference-between-and/63701/3 "2004-09-09T13:55:23Z")

</div>

okok… i see… thx for the answer…
