DEV Community

Discussion on: 5 interesting and not-necessarily-useful Javascript tricks

Collapse
 
stevematdavies profile image
Stephen Matthew Davies

They all seem a bit involved and overly bloated. I'm not sure I can see the usefulness of the stringifying a function, the explanation to me at least, is unclear. How would one unhash the function and use it if needed, using apply? for example, which in iteslf is not a great practice.

I do enjoy reading such Vanilla JS practices, since we all do get caught up in libraries and frameworks which do a lot of this heavy lifting for us, it can be easy to ignore what is going on under the hood. However, isn't this the point, so we can avoid overly verbose implementations?

Nice read all the same.

Collapse
 
areknawo profile image
Arek Nawo

Yeah, the use for stringifying function is a bit hard to explain. However, I’ve used it when creating my own framework, so there’s that.