Last active
August 4, 2016 12:17
-
-
Save ama-ch/d568c3aa61a9ae036f422662bf1ebb01 to your computer and use it in GitHub Desktop.
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
// 他の言語でありそうなコード | |
response = get('https://api.github.com'); # レスポンスが帰るまで待つ | |
print(response); | |
// JS(jQuery) | |
$.get('https://api.github.com', function(response) { | |
console.log(response); | |
}); | |
// ES6 | |
$.get('https://api.github.com', (response) => console.log(response)); | |
// body要素をクリックしたらアラートを表示 | |
document.body.addEventListener('click', function() { | |
alert('click!'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment