1

I need to write a method called "set jQuery data" and I'm stuck on the formatting.

  • setJQueryData? (I feel this wins on readability but I'm uncertain it's correct.)
  • setJqueryData?
  • setjQueryData?
John Kugelman
  • 349,597
  • 67
  • 533
  • 578
Gem
  • 51
  • 3
  • AFAIK it's `setJqueryData` even for names and abbreviations. The reason is automatic tooling like Angular cli generator. A name like `setJqueryData` would be converted to `set-jquery-data`. `setJQueryData` would be converted to `set-j-query-data`. `setjQueryData` would be converted to `setj-query-data`. – jabaa Sep 26 '21 at 23:37
  • You can see [Acronyms in CamelCase](https://stackoverflow.com/questions/15526107/acronyms-in-camelcase) for a lot of discussion but it too was closed for being opinion based. – pilchard Sep 26 '21 at 23:47
  • 1
    Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Oct 04 '21 at 19:27
  • @jabaa, thank you, that was a plenty good reason for me to settle for `setJqueryData`. – Gem Oct 08 '21 at 19:24

1 Answers1

1

Camel Case should never have two capital letters in a row and is generally the first letter of each word. jQuery is one word. Therefore, setJqueryData

On a sidenote, ebay is now all lowercased and is no longer eBay