Skip to content

Instantly share code, notes, and snippets.

@AminBusiness
Created November 8, 2018 21:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AminBusiness/6d2b0465c64c35f36475d04a40ba6722 to your computer and use it in GitHub Desktop.
Save AminBusiness/6d2b0465c64c35f36475d04a40ba6722 to your computer and use it in GitHub Desktop.
<script id="jsbin-javascript">
//What is the output?
var hero = {
_name: 'Amin Elhasan',
getSecretIdentity: function()
{
return this._name;
}
};
var stoleSecretIdentity = hero.getSecretIdentity;
console.log(stoleSecretIdentity());
console.log(hero.getSecretIdentity());
</script>
//What is the output?
var hero = {
_name: 'Amin Elhasan',
getSecretIdentity: function()
{
return this._name;
}
};
var stoleSecretIdentity = hero.getSecretIdentity;
console.log(stoleSecretIdentity());
console.log(hero.getSecretIdentity());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment