Skip to content

Instantly share code, notes, and snippets.

@ashga
Created October 16, 2012 19:38
Show Gist options
  • Save ashga/3901478 to your computer and use it in GitHub Desktop.
Save ashga/3901478 to your computer and use it in GitHub Desktop.
Question 6 javascript
for (var i = 0; i < divs.length; i++) {
divs[i].style.color = "black"
.style.border = thickness + 'px solid blue'
.style.backgroundColor = "white";
}
for(var i = 0; i < 1000; i++){
var el = document.createElement('div')
.appendChild(document.createTextNode('Node ' + (i + 1)));
document.getElementById('nodeHolder').appendChild(el);
}
var step = function(){
nMax = 10;
i = 0;
//do stuff
i += 1;
if(i < nMax){
step();
}else{
alert('finished');
}
}
step();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment