Created
July 16, 2017 05:46
-
-
Save webhipster/4a12c19a56deea7f4148338bbcf5333d to your computer and use it in GitHub Desktop.
JS Bin // source http://jsbin.com/habicazori
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"> | |
<meta name="viewport" content="width=device-width"> | |
<script src="https://code.jquery.com/jquery-2.1.4.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/rxjs/4.0.6/rx.all.js"></script> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<input id="textbox" /> | |
<script id="jsbin-javascript"> | |
"use strict"; | |
var Observable = Rx.Observable; | |
var vals = [1, 2, 3].map(function (x) { | |
return x + 1; | |
}); | |
var textbox = document.getElementById("textbox"); | |
var keypresses = Observable.fromEvent(textbox, 'keypress'); | |
keypresses.forEach(function (e) { | |
return console.log(e.keyCode); | |
}); | |
function searchWikipedia(term) { | |
var url = "https://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=" + encodeURIComponent(term) + "&callback=?"; | |
console.log(url); | |
} | |
searchWikipedia('Terminator'); | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">var Observable = Rx.Observable; | |
var vals = [1,2,3].map(x => x +1); | |
var textbox = document.getElementById("textbox"); | |
var keypresses = Observable.fromEvent(textbox, 'keypress'); | |
keypresses.forEach(e => console.log(e.keyCode)); | |
function searchWikipedia(term) { | |
var url = "https://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=" + encodeURIComponent(term) + "&callback=?"; | |
console.log(url); | |
} | |
searchWikipedia('Terminator');</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
"use strict"; | |
var Observable = Rx.Observable; | |
var vals = [1, 2, 3].map(function (x) { | |
return x + 1; | |
}); | |
var textbox = document.getElementById("textbox"); | |
var keypresses = Observable.fromEvent(textbox, 'keypress'); | |
keypresses.forEach(function (e) { | |
return console.log(e.keyCode); | |
}); | |
function searchWikipedia(term) { | |
var url = "https://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=" + encodeURIComponent(term) + "&callback=?"; | |
console.log(url); | |
} | |
searchWikipedia('Terminator'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment