Difference Between Single and Double Quoted Strings in ActionScript

You can use either as delimiter for a string. They are however not interchangeable, i.e. you can't start a string with an apostrophe and end it with a quotation mark.

The only difference is which characters you need to escape. Inside a string delimited by quotation marks you need to escape quotation marks but not apostrophes, and vice versa.

To put the text He said "It's all right" and laughed. in a string you can use:

"He said \"It's all right\" and laughed."

or:

'He said "It\'s all right" and laughed.'

No.

// * required - at least 15 characters


There is no difference.

This is from ActionScript: The definitive Guide:

String is the datatype used for textual data (letters, punctuation marks, and other characters). A string literal is any combination of characters enclosed in quotation marks:

    "asdfksldfsdfeoif"  // A frustrated string
    "greetings"         // A friendly string
    "[email protected]"   // A self-promotional string
    "123"               // It may look like a number, but it's a string
    'singles'           // Single quotes are acceptable too