re: TIL: JavaScript replace() command with callback VIEW POST

VIEW FULL DISCUSSION
 

Technically a "callback function" is one that's called at a later point in time, like asynchronously, as in "we'll call you back later".

In this case it's just a "function", nothing so exotic. This function is called immediately if/when a substitution is to be performed.

It's easy to understate how powerful a tool this can be though, so good article about using it!

code of conduct - report abuse