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

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) } }

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

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) {