Re: (Newbie?) question about js syntax in store/index.js

2018-02-14 Thread Terry Brown
On Wed, 14 Feb 2018 17:26:10 -0600
"Edward K. Ream"  wrote:

> ​So these two lines are equivalent:
> 
> ​
> { TEST (x) { return(x+2) } }
> ​
> { TEST: function (x) { return(x+2) } }
> 
> Edward

http://www.benmvp.com/learning-es6-enhanced-object-literals/

explains a bit more explicitly.  But yes.

Cheers -Terry

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: (Newbie?) question about js syntax in store/index.js

2018-02-14 Thread Edward K. Ream
On Wed, Feb 14, 2018 at 5:03 PM, Edward K. Ream  wrote:

>
>
>
>> Typing in the Chrome console:
>>
>> a =
>> ​​
>> { TEST (x) { return(x+2) } }
>> a.TEST(2)
>> 4
>>
>
​So these two lines are equivalent:

​
{ TEST (x) { return(x+2) } }
​
{ TEST: function (x) { return(x+2) } }

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: (Newbie?) question about js syntax in store/index.js

2018-02-14 Thread Edward K. Ream
On Wed, Feb 14, 2018 at 3:26 PM, Terry Brown  wrote:

> On Wed, 14 Feb 2018 13:12:10 -0800 (PST)
> "Edward K. Ream"  wrote:
>
> > These look kinda like function definitions without "function" or "=>".
>
> New to me, but they do seem to be function definitions without function
> or =>
>
> Typing in the Chrome console:
>
> a = { TEST (x) { return(x+2) } }
> a.TEST(2)
> 4
>
> https://developer.mozilla.org/en-US/docs/Web/JavaScript/
> Reference/Functions/Method_definitions
>
> suggests they're properties, to the degree those are different from
> functions.
>

​Thanks, Terry.  This should get me started.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: (Newbie?) question about js syntax in store/index.js

2018-02-14 Thread Terry Brown
On Wed, 14 Feb 2018 13:12:10 -0800 (PST)
"Edward K. Ream"  wrote:

> These look kinda like function definitions without "function" or "=>".

New to me, but they do seem to be function definitions without function
or =>

Typing in the Chrome console:

a = { TEST (x) { return(x+2) } }
a.TEST(2)
4

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Method_definitions

suggests they're properties, to the degree those are different from
functions.

Cheers -Terry

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.