Conax
Conax

Reputation: 69

Colon in JavaScript statement

The following code is extracted from SharePoint's SP.UserProfiles.debug.js library.

    getUserProfilePropertiesFor: function (d) {
    a: ;
    var b = this.get_context(),
    a,
    c = new SP.ClientActionInvokeMethod(this, "GetUserProfilePropertiesFor", [d]);
    b.addQuery(c);
    a = [];
    b.addQueryIdAndResultObject(c.get_id(), a);
    return a
}

What does the "a: ;" on second line mean? When I step-through in IE Developer tool, that line was skipped right through. But it also does not look like a label as it has a semi-colon at the end.

Upvotes: 2

Views: 102

Answers (1)

basarat
basarat

Reputation: 275947

What does the "a: ;" on second line mean?

It is a label statement : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/label

Upvotes: 3

Related Questions