When naming variables, do you use URL or Url?

example: somethingURL or somethingUrl?

#webdev #software #coding #javascript

@alejandror

Haven't done much JavaScript myself, but normally I do the latter (somethingUrl) when naming variables or functions/methods

@alejandror I never respect the original punctuation of acronyms. Camel case… The end.
@alejandror Probably Url. Because what if there's another word after Url? somethingURLSomething messes up the camel case, somethingUrlSomething flows better.
@alejandror I reluctantly use somethingUrl, but it looks wrong.
@alejandror somethingURL although it does look odd if you have something after it. I think I do this because I use a lot of db fields like myTableID and using Id bugs me
@alejandror If you asked a script to convert somethingURL to, say, kebab-case, it would return “something-u-r-l” which is probably not what you’d want. “somethingUrl” is equivalent to “something-url” and is therefore correct in my mind.
@blazemongr this is an excellent argument! Agreed 🔥