Created
March 21, 2016 23:35
-
-
Save mattiaerre/005ddfd87af6d159ea96 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
(function() { | |
var you = true; | |
const MATTIA = 'Mattia'; | |
var myName = { | |
is: function(name) { | |
return name == MATTIA | |
} | |
}; | |
var to = { | |
call: { | |
me: function(name) { | |
if (myName != name) { | |
throw new Error('#epicfail'); | |
} | |
} | |
} | |
}; | |
if (you) { | |
try { | |
while (myName.is(MATTIA)) { | |
to.call.me('Matteo'); | |
} | |
} catch (error) { | |
console.log('error:', error.message); | |
} | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment