News

The anonymous function here takes an argument x and calls the capitalize method on it. The map call ensures that the anonymous function is called once for each item. Modern C++ has lambda expressions.
Callbacks work fine for handling asynchronous code in JavaScript, but promises and the async and await keywords are cleaner and more flexible.