Antony Courtney wrote:
Does it help to think in terms of arrow functions? We're assuming
that the caller knows about the template and the callee knows
about the data. If so, then we can do something like this instead:
let formatted = getData(data => `<${data.x}>hello,
${data.u}</${x}>`);
Nice. Yes, with the reduced syntactic overhead afforded by =>, this
could indeed be quite helpful for my use case. I'll keep it mind.
This is pretty sweet if you know the property names. But I inferred
(Rick did too) that in some cases you won't. True?
/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss