Created
March 1, 2018 19:23
-
-
Save ShahinAhmed7/a69fea6fca4122389c79224e8d87dbba to your computer and use it in GitHub Desktop.
ES6-tuts3// source http://jsbin.com/wuqiqumuke
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> | |
<script src="http://fb.me/react-with-addons-0.14.0.js"></script> | |
<script src="http://fb.me/react-dom-0.14.0.js"></script> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<div id=example></div> | |
<h1>Hello world</h1> | |
<button id="me">Oops</button> | |
<script id="jsbin-javascript"> | |
//jshint esnext:true | |
function crazy(){ | |
console.log(this); | |
} | |
var sane = () => console.log(this); | |
// crazy(); | |
var button = document.getElementById('me'); | |
button.addEventListener('click', sane); | |
</script> | |
<script id="jsbin-source-html" type="text/html"><!DOCTYPE html> | |
<html> | |
<head> | |
<script src="//fb.me/react-with-addons-0.14.0.js"><\/script> | |
<script src="//fb.me/react-dom-0.14.0.js"><\/script> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<div id=example></div> | |
<h1>Hello world</h1> | |
<button id="me">Oops</button> | |
</body> | |
</html></script> | |
<script id="jsbin-source-javascript" type="text/javascript">//jshint esnext:true | |
function crazy(){ | |
console.log(this); | |
} | |
var sane = () => console.log(this); | |
// crazy(); | |
var button = document.getElementById('me'); | |
button.addEventListener('click', sane);</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
//jshint esnext:true | |
function crazy(){ | |
console.log(this); | |
} | |
var sane = () => console.log(this); | |
// crazy(); | |
var button = document.getElementById('me'); | |
button.addEventListener('click', sane); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment