Javascript examples for Language Basics:Introduction
You can define string values using either the double quote or single quote characters.
The quote characters you use must match. You can't start a string with a single quote and finish with a double quote.
<!DOCTYPE HTML> <html> <head> <title>Example</title> </head> <body> <script type="text/javascript"> var firstString = "This is a string"; var secondString = 'And so is this'; </script> </body> </html>//from ww w . ja v a2s . com