Loading ...
Sorry, an error occurred while loading the content.
 

Re: Mixed single and double quotes

Expand Messages
  • benquarmby
    That sounds like good advice. Like you say though, difficult to verify. Would you analyze the contents of the string, or the subject of the assignment?
    Message 1 of 6 , Jul 3, 2012
      That sounds like good advice. Like you say though, difficult to verify. Would you analyze the contents of the string, or the subject of the assignment? Something else?

      Without a reliable way to verify the intention of a string, applying the same advice you give for tabs vs. spaces seems preferable - Pick one and use it consistently.

      That advice would also prevent cowboy developers from creatively misinterpreting the difference between internal and external.

      --- In jslint_com@yahoogroups.com, "douglascrockford" <douglas@...> wrote:
      >
      > My advice is to use "double quotes" for strings that are meaningful externally, like urls, html templates, and error messages; and to use 'single quotes' for strings that are meaningful internally, like character constants, property names, and symbols.
      >
      > I have not discover an automatic way to verify usage.
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.