Created
July 4, 2017 20:02
-
-
Save Bajena/81099b43c7e974fe3be6fe8fe199b459 to your computer and use it in GitHub Desktop.
XHR breakpoints demo
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
setInterval(function() { | |
var x = getRandomInt(0, 100); | |
$('#numbers').append(x).append("<br/>"); | |
}, 1000); | |
setInterval(function() { | |
fetch('https://www.random.org/integers/?num=1&min=0&max=100&col=1&base=10&format=plain&rnd=new').then(function(response){ | |
return response.text(); | |
}).then(function(number) { | |
$('#numbers').prepend("<br/>").prepend(number); | |
}); | |
}, 2000); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment