Created
June 10, 2015 22:53
-
-
Save ericpkatz/1f07974e76acd4b9ae96 to your computer and use it in GitHub Desktop.
JS Bin // source http://jsbin.com/qomico
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> | |
console.clear(); | |
function sayHi(){ | |
//console.log(this); | |
} | |
var foo = { | |
bar: "hello world", | |
sayHi: function(){ | |
console.log(this.bar); | |
} | |
} | |
foo.sayHi(); | |
foo.sayHi.call({ bar: 'goodbye'}); | |
foo.sayHi.call({}); | |
foo.sayHi(); | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">console.clear(); | |
function sayHi(){ | |
//console.log(this); | |
} | |
var foo = { | |
bar: "hello world", | |
sayHi: function(){ | |
console.log(this.bar); | |
} | |
} | |
foo.sayHi(); | |
foo.sayHi.call({ bar: 'goodbye'}); | |
foo.sayHi.call({}); | |
foo.sayHi(); | |
</script></body> | |
</html> |
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
console.clear(); | |
function sayHi(){ | |
//console.log(this); | |
} | |
var foo = { | |
bar: "hello world", | |
sayHi: function(){ | |
console.log(this.bar); | |
} | |
} | |
foo.sayHi(); | |
foo.sayHi.call({ bar: 'goodbye'}); | |
foo.sayHi.call({}); | |
foo.sayHi(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment