Задания по JavaScript 09 | Сгенирировать шахматную доску 7х7

Published: 10 July 2017
on channel: Miromir
2,815
25

Сгенирировать шахматную доску 7х7


Code :

var bigdiv = document.createElement('DIV');
bigdiv.className = "bigdiv";
document.body.appendChild(bigdiv);
var size = 7 ;
var allsize = size * size;




for (var i = 0; i (ЗНАК МЕНЬШЕ) allsize; i++) {
var bigDiv = document.querySelector('.bigdiv');
var div = document.createElement('DIV');
if(i%2){
div.className = 'red';
}
else{
div.className = 'block';
}
bigDiv.appendChild(div);

}
Git - https://github.com/SSvyatoslav/LearnJ...


Watch video Задания по JavaScript 09 | Сгенирировать шахматную доску 7х7 online without registration, duration hours minute second in high quality. This video was added by user Miromir 10 July 2017, don't forget to share it with your friends and acquaintances, it has been viewed on our site 2,81 once and liked it 2 people.