• Re: Any way to do this in JavaScript?

    From The One Who Is Writing This@21:1/5 to All on Thu Jun 30 11:47:15 2022
    Write a program, that will make a program for you.
    If the program says, that it is impossible to make that program, then you shouldn't argue and you should accept this.

    The One Who Is Writing This

    $Bill kirjutas Teisipäev, 19. juuli 2016 kl 19:12:56 UTC+2:
    Sent this to alt... by mistake - let's try here.

    In Perl, I have:

    my ($title, $chan, $call, $sTime, $dur) = split /~~/, $el;

    I've converted this to JavaScript thusly:

    var flds = el.split('~~'); // split into array, then to vars

    var title = flds[0];
    var chan = flds[1];
    var call = flds[2];
    var sTime = flds[3];
    var dur = flds[4];

    I was hoping for a more straightforward/cleaner syntax - something like:

    var (title, chan, call, sTime, dur) = el.split('~~'); // do it all in one like Perl

    Any way to do that?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)