DEV Community

Cover image for 22 JavaScript Functions You'll Use 99% of The Time 💯🔥

22 JavaScript Functions You'll Use 99% of The Time 💯🔥

Arjun Vijay Prakash on March 17, 2024

The functions that follow are fundamental to web development and javascript programming in general, simplifying tasks such as debugging using the o...
Collapse
 
moopet profile image
Ben Sinclair

I don't know how much I'm like your "average" JS developer since it's not a main part of my job.

As a single data point, while I use most of these, I never (or almost never) use these:

  • setInterval
  • setTimeout
  • reduce
  • reverse
  • isArray
Collapse
 
miketalbot profile image
Mike Talbot ⭐ • Edited

Of all of these, the only thing I don't use a lot is reverse, though it appears in my code in several places. I think you end up with these more often when you use JS on the front and back end.

The one I use a ton and isn't here is flat and occasionally flatMap.

Collapse
 
ludamillion profile image
Luke Inglis

I was going to post basically the same list. :)

Collapse
 
arjuncodess profile image
Arjun Vijay Prakash

Agree! These are simple functions that make the development easier but yes, few of them are not really useful, it really depends from dev to dev.

Thanks for the comment!

Collapse
 
lexlohr profile image
Alex Lohr

I'm missing String.prototype.replace. Regular expressions are regularly helpful, especially with a replacer function.

Collapse
 
arjuncodess profile image
Arjun Vijay Prakash

Yeah! I'll make sure I add them in the second part, Thanks!

Collapse
 
patzi275 profile image
Patrick Zocli

It's a pleasure to read you

Collapse
 
arjuncodess profile image
Arjun Vijay Prakash

Thanks for the comment, Patrick! I appreciate those kind words.

Collapse
 
bjoentrepreneur profile image
Bjoern

Nice cheat sheet. Thanks for taking the time and posting this

Collapse
 
arjuncodess profile image
Arjun Vijay Prakash

Welcome!

Collapse
 
masekere profile image
Gift Masekere

it seems l had forgotten to use splice(), thank you for posting,

Collapse
 
arjuncodess profile image
Arjun Vijay Prakash

My pleasure!

Collapse
 
krakoss profile image
krakoss

very useful information Thank you very much for this article

Collapse
 
arjuncodess profile image
Arjun Vijay Prakash

I'm glad you liked it!

Collapse
 
jeffchavez_dev profile image
Jeff Chavez

Thanks for this. These functions are helpful.

Collapse
 
arjuncodess profile image
Arjun Vijay Prakash

My pleasure!

Collapse
 
ivan20121 profile image
Ivan

Awesome! Thank you! Good work

Collapse
 
arjuncodess profile image
Arjun Vijay Prakash

I'm glad it was helpful!

Collapse
 
terabytetiger profile image
Tyler V. (he/him)

Solid list 👍🏻

I was expecting to see at least 1 that I had never used before, but I use all of these fairly frequently.

Collapse
 
arjuncodess profile image
Arjun Vijay Prakash

Of course, you'll use them 99% of the time. By the way, thanks for the insight, I'll make sure to include some interesting ones in my coming posts!

Thanks!