@Licenser They don't claim to AVOID callbacks, they abstract them. Callbacks are the whole point of asynchronous programming. These libraries are just trying to mitigate the "hell" part.
And it's worth mentioning that about 90% of the examples I hear of Callback Hell are really just examples of poor coding practices, like nesting 5 levels of anonymous functions.
Async programming is only ugly when it's done by people who don't understand it.
Nope, I meant what I posted.
The reason for including the date first is to reduce the (admittedly very low) likelihood of collisions between the random strings.
By prefixing the date, you reduce the risk of duplication -- because the colliding hashes would have to have been generated within a millisecond of eachother to actually cause a problem.
You can also wrap your code in an IIFE and create a local
undefined
.