Skip to content

Instantly share code, notes, and snippets.

@cdata
Created February 15, 2011 23:10
Show Gist options
  • Select an option

  • Save cdata/828483 to your computer and use it in GitHub Desktop.

Select an option

Save cdata/828483 to your computer and use it in GitHub Desktop.
This is a very strange syntax using a combination of colon and brackets. Anyone know its purpose?
a: {
var x=1;
var y=2;
};
@cdata
Copy link
Author

cdata commented Feb 15, 2011

Figured it out. For anyone else curious about lesser-known JavaScript syntax elements, here you go: https://developer.mozilla.org/en/JavaScript/Reference/Statements/label

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment