Skip to content

Instantly share code, notes, and snippets.

@rhyolight
Created January 13, 2012 05:03
Show Gist options
  • Save rhyolight/1604766 to your computer and use it in GitHub Desktop.
Save rhyolight/1604766 to your computer and use it in GitHub Desktop.
what not to do
do {
if (parts[pathIndex + 2]) {
id = parts[pathIndex + 2];
type = parts[pathIndex + 1];
} else if (parts[pathIndex + 1]) {
// there is no id
type = parts[pathIndex + 1];
}
pathIndex += 2;
} while();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment