Create a gist now

Instantly share code, notes, and snippets.

@Squeegy / Secret
Created Apr 22, 2011

What would you like to do?
for own attr, value of this
if attr == 'foo' && value == 'bar'
console.log 'Found a foobar!'
var attr, value;
var __hasProp = Object.prototype.hasOwnProperty;
for (attr in this) {
if (!, attr)) continue;
value = this[attr];
if (attr === 'foo' && value === 'bar') {
console.log('Found a foobar!');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment