I try to use the AWS client scan the dynamoDB table.
I define a function as
var scan = (err, data) =>{}
this couldn't work but when I write
function scan (err, data){}
this work fine.
I don't understand why when I define the function with the arrow expression couldn't work, even inside the function, when I use forEach() or promise it all work fine in the same script.