anon-function

by John Wick

JavaScript

function foo(bar, cb) {
  cb('xyz')
}

/*
foo(() => {})
*/

// working cia
/* foo('hello', function (str) {
  console.log(str)
}); */

foo( function (str) {
  console.log(str)
});