Created
November 3, 2009 13:23
-
-
Save metafeather/225044 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
/* | |
Created using http://jsbin.com | |
Source can be edit via http://jsbin.com/ukipo/edit | |
*/ | |
var alldivs = document.getElementsByTagName('div'); | |
for (var i = 0; i < alldivs.length; i++) { // infinite loop | |
document.body.appendChild(document.createElement('div')); | |
} | |
// because .length is a live value and is updating when you call it - therefore becomes an infinite loop! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment