Created
May 16, 2017 13:54
-
-
Save vladzadvorny/86b35ac4a2368bf744b118977e114e9c to your computer and use it in GitHub Desktop.
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
(function () { | |
var table = document.createElement('table'); | |
for (var i = 0; i < 42; i++) { //24 | |
var row = table.insertRow(i); | |
for (var j = 0; j < 42; j++) { | |
row.insertCell(j); | |
} | |
} | |
document.querySelector('.display').appendChild(table); | |
})(); | |
var getPixel = function (x, y) { | |
return document.querySelector(`.display table tr:nth-child(${y + 1}) td:nth-child(${x + 1})`); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment