javascript string difference

Posted by Konrad on Stack Overflow See other posts from Stack Overflow or by Konrad
Published on 2010-05-27T15:23:23Z Indexed on 2010/05/27 15:31 UTC
Read the original article Hit count: 154

Filed under:
|
|

What is the difference (if any) between the javascript strings defined below?

var str1 = "Somestring";

var str2 = 'Somestring';

"" and '' mean two very different things to me predominantly writing code in C++ :-)

EDIT: If there is no difference why are there two ways of achieving the same thing and which is considered better practice to use and why. Thanks!

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about strings