Created
August 20, 2014 11:32
-
-
Save jlebrech/09b0c830c13f11098511 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
results = [] | |
for (i in res.guests){ | |
model = { | |
name: res.guests[i].name | |
}; | |
Object.defineProperties(model, { | |
'reversename': { | |
get: function(){ | |
return this.name.split('').reverse().join(''); | |
} | |
} | |
}); | |
results.push(model) | |
} | |
return results; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment