On 4 juil, 14:33, jdalton <[EMAIL PROTECTED]> wrote:
> You can declare more than one variable at a time via the use of the
> comma.
>
> Look under "The Name of a 
> Variable"http://www.functionx.com/javascript/Lesson04.htm

I agree on the multiple declaration syntax, but in the cases above,
those variables have already been declared earlier in the code and are
simply assigned new values in the reported lines. For example lines
214-226 (in version 1.5.1.1) read :


    var result = '', source = this, match; // ######## This comma is
OK #########
    replacement = arguments.callee.prepareReplacement(replacement);

    while (source.length > 0) {
      if (match = source.match(pattern)) {
        result += source.slice(0, match.index);
        result += String.interpret(replacement(match));
        source  = source.slice(match.index + match[0].length);
      } else {
        result += source, source = ''; // ######## This comma is what
puzzles me #########
      }
    }
    return result;


Thanks for your quick reply.

Vincent


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to