12

JS method names I still can't remember, even after 6 years of writing in it:

append is called concat,
any is called some,
all is called every,
contains is called includes

I always have to pause for a good long while or look it up when I need to use any of these is annoying, but my brain refuses to adapt to these names.

Comments
  • 4
    JS is the godfather of shitting on the principle of least surprise.
  • 4
    ah yes, the concatChild and querySelectorEvery. Forget them every time
  • 4
    Yep, that’s JS for you.
    I have to look them up pretty often, too — especially since I’ve been switching between Ruby (with its consistency and all its aliases) and JS (with its none and none).

    Personally, I have trouble remembering the names of the random functions because they’re so different between languages: rand, rand(), RND, random(), randInt(), Math.random(), Math.rand(), etc.
  • 0
    because the convention of the language you use is “right”, while other conventions are “wrong”. Gotcha fam
Add Comment