How to Create an Async Function via “new Function”

One thing I love about JavaScript is that there are many ways to accomplish the same task, one such example being creating functions. There are several patterns for functions; one of the last you see used is the new Function method: /* new Function(arg1, arg2 (…), body) */ const myFunction = new Function(‘users’, ‘salary’, ‘return […]

The post How to Create an Async Function via “new Function” appeared first on David Walsh Blog.