-
-
Save AlexJWayne/62860f0c07d60320151c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for own attr, value of this | |
if attr == 'foo' && value == 'bar' | |
console.log 'Found a foobar!' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var attr, value; | |
var __hasProp = Object.prototype.hasOwnProperty; | |
for (attr in this) { | |
if (!__hasProp.call(this, 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