@psankar More often its used in small functions that do some operations on the input.
@psankar
return itm * item;
}
}. then(console.log)
@psankar
Without =>:
fetch()
.then(function(res) {
return res.json();
}.then(function(arr) {
return arr.map(function(itm) {
@psankar
With arrow:
fetch()
.then(res = > res.json)
.then(arr => arr.map(itm => itm * itm))
.then(console.log)
@psanka this has some good examples — developer.mozilla.org/en/docs/Web/Ja…
@psankar Arrow fns are quite handy in async programming. Chaining will make code flow easier to read.
@psankar do u mean arrow fns in JS vs other langs?? or, arrow fncs vs traditional ones in JS itself??
@thecodejack Looks like you are frustrated with some stuff here. :)
Empower your emails using email markups — developers.google.com/gmail/markup/
Don’t mess with Google dansdeals.com/archives/98444
@psankar What would be the impact of this?