DEV Community

CuriousDev
CuriousDev

Posted on

What are some useful functions of JavaScript, which you like to show?

Usually I enjoy it a lot to look for posts here, which provide some standard functions of JS. With this I can extend my knowledge step by step and these can be useful many times. At least it feels to make more sense than learning more about a Framework or any other product, which I possibly will not use soon.

What are some funtions, which you would like to share with us?

Let me start as first contributor.

I like the JSON object's functions "parse" and "stringify", because the JS objects are very similar to the stringified representation of JSON. With "parse" you can easily create a JS object from a JSON string and with "stringify" you can do this the other way round. But for the latter you have to be careful: JS objects are more powerful, you will not be able to convert any object to JSON. More here: Mozilla documentation. Thanks for reading and any contribution in advance!

Top comments (4)

Collapse
 
Sloan, the sloth mascot
Comment deleted
Collapse
 
curiousdev profile image
CuriousDev • Edited

It is good to know Hoisting, because it explains how it is possible to be able to define functions after executions.

Collapse
 
ooling profile image
Sam oo Líng

nice! I'm looking forward to it

Collapse
 
hacker4world profile image
hacker4world

The higher order array methods map, forEach, reduce and sort