Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The first bit defines a function that creates an object with a couple of properties and returns it. I think we're all clear on that bit. :-)</p> <p>The second bit, though, is <em>not using</em> that function. It's defining a <em>label</em> with the same name. Although it uses the same sequence of characters, it is <strong>not</strong> a reference to the function above. Firefox's interpretation makes as much sense as anything else, because a label should be followed by something to which it can refer.</p> <p>For more about labelled statements, see Section 12.12 of <a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm" rel="noreferrer">the spec</a>.</p> <hr> <p><strong>Off-topic</strong>: I would avoid using code from this source. Whoever wrote it is apparently fairly new to JavaScript and doesn't show much sign that they know what they're doing. For instance, they've left the <code>()</code> off the <code>new Object()</code> call, and while that's allowed, it's fairly dodgy thing to do. They could argue that they were doing it to save space, but if they were, they'd be better off using an object literal:</p> <pre><code>function ULSTYE() { return { ULSTeamName: "Microsoft SharePoint Foundation", ULSFileName: "SP.UI.Dialog.debug.js" }; } </code></pre> <p>There's never much reason to write <code>new Object()</code> at all; <code>{}</code> is functionally identical.</p> <p>And, of course, there's no justification for the second bit at all. :-)</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload