Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > alt.comp.lang.javascript > #7

Re: Any way to do this in JavaScript?

X-Received by 10.176.2.248 with SMTP id 111mr2867573uah.0.1495163615696; Thu, 18 May 2017 20:13:35 -0700 (PDT)
X-Received by 10.157.34.229 with SMTP id y92mr162768ota.15.1495163615487; Thu, 18 May 2017 20:13:35 -0700 (PDT)
Path csiph.com!3.us.feeder.erje.net!feeder.erje.net!2.us.feeder.erje.net!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!t26no342155qtg.1!news-out.google.com!v18ni2389ita.0!nntp.google.com!67no553875itx.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups alt.comp.lang.javascript
Date Thu, 18 May 2017 20:13:35 -0700 (PDT)
In-Reply-To <nmki0q$nl9$1@dont-email.me>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=96.54.64.131; posting-account=6V9v2QoAAABpfeUESPWUmaYqAUZWpuCv
NNTP-Posting-Host 96.54.64.131
References <nmki0q$nl9$1@dont-email.me>
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <fca84d5d-c7e1-417a-a2a6-e1150dfaed06@googlegroups.com> (permalink)
Subject Re: Any way to do this in JavaScript?
From kintalken@gmail.com
Injection-Date Fri, 19 May 2017 03:13:35 +0000
Content-Type text/plain; charset="UTF-8"
Lines 17
Xref csiph.com alt.comp.lang.javascript:7

Show key headers only | View raw


On Monday, July 18, 2016 at 11:40:28 PM UTC-7, $Bill wrote:
> In Perl, I have:
> 
> 	my ($title, $chan, $call, $sTime, $dur) = split /~~/, $el;

$el = 'a~~b~~c~~d~~e' ;

[$title, $chan, $call, $sTime, $dur] = $el.split('~~') ; 

console.log({title : $title , chan : $chan , call : $call , sTime : $sTime , dur : $dur}) ;

=>

{ title: 'a', chan: 'b', call: 'c', sTime: 'd', dur: 'e' }

.c.f. "deconstruction" https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment

~~ kintalken ~~

Back to alt.comp.lang.javascript | Previous | NextPrevious in thread | Find similar


Thread

Any way to do this in JavaScript? $Bill <news@todbe.com> - 2016-07-18 23:40 -0700
  Re: Any way to do this in JavaScript? kintalken@gmail.com - 2017-05-18 20:13 -0700

csiph-web