difference between ' and " chars

G

gizz

Hi,

Is there a difference between :

var myStr = "This is some text" ;

and,

var myStr = 'This is some text' ;

Is it *exactly* the same for the JS engine ?


Thanks in advance,


gizz
 
D

David Mark

Hi,

Is there a difference between :

var myStr = "This is some text" ;

and,

var myStr = 'This is some text' ;

Is it *exactly* the same for the JS engine ?

Yes.
 
D

Dr J R Stockton

In comp.lang.javascript message <[email protected]>
Is there a difference between :

var myStr = "This is some text" ;

and,

var myStr = 'This is some text' ;

Is it *exactly* the same for the JS engine ?

As is, yes. But in the first you can insert 'cat' and in the second you
can insert "cat" But \'cat\' and \"cat\" can be inserted into both.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top