i was wondering what is the differences between this:
Option A:
var elements = ['a', 'b', 'c', 'd'];
elements.forEach(function(e){
console.log('element is: ' + JSON.stringify(e, null, 2));
});
Option B:
var elements = ['a', 'b', 'c', 'd'];
elements.forEach((e) => {
console.log('element is: ' + JSON.stringify(e, null, 2));
});
Option B would be better/faster than A? Or is the same?
Thanks