Wednesday, 28 June 2017

jquery - javascript formatting opinion: ' vs "

From the point of view of someone who occasionally uses one language to write code in another, using the single quote is preferable. For instance, when I use VB6 to drive Octave or Agena (as I was doing yesterday), I have to use a doubled double-quote to escape a single double-quote. For example,



T "CACos", CACos(CReset(-P_I, 2)), CParse(script("octave", str.Subst("printf(""%s"",num2str(acos(complex([1],[2]))));", -P_I, 2)))


Were I driving Javascript, I'd use the single quote option.

No comments:

Post a Comment

casting - Why wasn't Tobey Maguire in The Amazing Spider-Man? - Movies & TV

In the Spider-Man franchise, Tobey Maguire is an outstanding performer as a Spider-Man and also reprised his role in the sequels Spider-Man...