From 4326bc7d5f5c18d866e588c92e17f59aab41eb42 Mon Sep 17 00:00:00 2001 From: Maxwell Sands Date: Mon, 6 Jun 2016 07:51:54 -0600 Subject: [PATCH] Black and red done --- script.js | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/script.js b/script.js index 9233771b..42f75a80 100644 --- a/script.js +++ b/script.js @@ -1 +1,56 @@ -// Your JS goes here \ No newline at end of file +// // Your JS goes here +// +// for(var count = 0; count < 80; count++){ +// +// if(count === 0){ +// document.write('
'); +// } +// if(count === 1){ +// document.write('
'); +// } +// else if (count % 2 === 0){ +// document.write('
'); +// } +// +// else if(count % 5 === 0 && count % 2 !== 0){ +// document.write('
'); +// } +// else if(count % 5 === 0 && count % 2 === 0){ +// document.write('
'); +// } +// else if (count % 3 === 0 && count %2 !== 0) { +// document.write('
'); +// } +// } +var container = document.createElement("div"); +container.style.width = "100vw"; +container.style.height = "100vh" +container.style.margin = "0" +container.style.padding = "0"; + +document.body.appendChild(container); + + + + +for (var counter = 0; counter < 63; counter++) { + + if(counter % 2 === 0){ + var div1 = document.createElement("div"); + div1.style.background = "#000000"; + div1.style.width = "11.1%"; + div1.style.paddingBottom = "11.1%"; + div1.style.float = "left"; + div1.style.display = "inline-block"; + container.appendChild(div1); + } + else{ + var div2 = document.createElement("div"); + div2.style.background = "#FF0000"; + div2.style.width = "11.1%"; + div2.style.paddingBottom = "11.1%"; + div2.style.float = "left"; + div2.style.display = "inline-block"; + container.appendChild(div2); + } +}