DEV Community

Cover image for Ultimate JavaScript CheatSheet

Ultimate JavaScript CheatSheet

Rahul on January 12, 2021

Cheat Sheets our something developers need always for reference. So here I have compiled many JavaScript reference codes. See the classification an...
Collapse
 
knufle profile image
Marcel

Hey, great article! Just one thing the "charAt()" example actually returns an empty space " ", not a "f"

Collapse
 
rahxuls profile image
Rahul

Agreed.

Thank for reading i am happy i have someone to read too.

Collapse
 
gwmccull profile image
Garrett McCullough

your toExponential and toPrecision examples are broken. If a return statement is on a line by itself, it will just return undefined.

Collapse
 
therealokoro profile image
Okoro Redemption

Beautiful Post.

Check out this Utility JavaScript Library I made that is sure to ease your workflow.
It contains methods and functions that manipulates the DOM, Strings, Numbers, Objects and even Mathematical operations, and other utility functions

Its called ToolJS and can be found on Github and NPM

npm install @redeakaa/tooljs
Enter fullscreen mode Exit fullscreen mode

You can check out this series I posted here on dev.to

Introduction to ToolJS. A JavaScript Utility Library

Collapse
 
kwiat1990 profile image
Info Comment hidden by post author - thread only accessible via permalink
Mateusz Kwiatkowski

It seems like the whole "the 2021" part of the article is missing. I don't want to be rude but all here is like fundamentals of JS and not some bright new features, which could help one in 2021. For that reason I would say the article's title is misleading at best and a clickbait at worst.

Collapse
 
centanomics profile image
Cent

Hi. Just wanted to say that the example for getMonth() is using getFullYear().

Thanks for the useful article!

Collapse
 
learnbyexample profile image
Sundeep
Collapse
 
eladc profile image
Elad Cohen

Great, thanks!
You have a mistake on your Do While Loop.

Collapse
 
matteodem profile image
Matteo De Micheli

Awesome blog post, I already really like the new includes method for Strings and Arrays 🎉

Collapse
 
eecolor profile image
EECOLOR

I think this is more complete as a reference: developer.mozilla.org/en-US/docs/W...

Collapse
 
tiiunder profile image
Felix G

I will steal some of those snippets for my personal cheat sheet ;-) Thank you!

Collapse
 
scipion profile image
Scipion

Do while snippet is wrong. In line 2 should be a "do" instead of a "while". Also the condition in last line, "(1 < 100)" makes an infinite loop, it seems it should be "i" instead of "1".

Collapse
 
z2lai profile image
z2lai

Nice, now make this article into a cheatsheet!

Collapse
 
ayabouchiha profile image
Aya Bouchiha

Great article

Collapse
 
shwetabh1 profile image
Shwetabh Shekhar

This is great. Thanks for sharing!

Some comments have been hidden by the post's author - find out more