I want to define a template string using backquotes in a different file and
then have it interpolated with actual values in a different file. How can I
do it?
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
Thanks, this would work.
How can I construct a template string dynamically? Like reading the
template from a file/database and then interpolate it.
On Tue, Dec 16, 2014 at 2:29 PM, Claude Pache claude.pa...@gmail.com
wrote:
Le 16 déc. 2014 à 09:27, Niloy Mondal niloy.monda...@gmail.com
in
order to interpolate its result ...
OR
you just go for this method which also works down to ES3 engine:
https://gist.github.com/WebReflection/8f227532143e63649804
Regards
On Tue, Dec 16, 2014 at 10:01 AM, Niloy Mondal niloy.monda...@gmail.com
wrote:
Thanks, this would work.
How can
Really awesome if we could have this feature.
On Sat, Mar 21, 2015 at 4:04 AM, Brendan Eich bren...@mozilla.org wrote:
But we could extend the cover grammar with some work. You'd have to push
ArrayLiteral and ObjectLiteral down from PrimaryExpression alternative
right-hand sides, to live
I wrote some code like the following in tracuer
```
class Foo {
constructor() {
spawn(function*() {
let data = yield this.fetchData(); // error because 'this' is
undefined
});
}
fetchData() {
// returns promise
}
}
```
I used the spawn function from here:
It would be really cool to have syntax to curry functions built into the
languages. Something like...
```js
curry function add(a, b) {
return a + b;
}
add(2)(3); // 5
```
___
es-discuss mailing list
es-discuss@mozilla.org
Currently, `Array.prototype.forEach` returns `undefined`. It would be more
useful if it returns the array itself.
Say I have written some code like this...
```js
const a = [1, 2, 3]
.map(square)
.map(plus1)
.reduce(add);
```
For some reason, I am not getting the expected output. For
gt; example would be a more general ::-able.
>
>
> On Fri, Oct 16, 2015 at 5:32 AM, Andrea Giammarchi <
> andrea.giammar...@gmail.com> wrote:
>
>> ```js
>> const a = [1, 2, 3]
>> .map(square)
>> .map(x => console.log(x) || x )
>> .map(plus1)
>&
x ** y ** z is easier to read/write than x.pow(y.pow(z))
On Aug 27, 2015 8:51 AM, Mark S. Miller erig...@google.com wrote:
On Wed, Aug 26, 2015 at 6:19 PM, Waldemar Horwat walde...@google.com
wrote:
On 08/26/2015 15:08, Mark S. Miller wrote:
The force of that precedent is indeed what my
9 matches
Mail list logo