Here are the two lines:
pixels[x-left] = {};
pixels[x-left][y] = true;
It would greatly allow me to clean up some code if the two could be combined into a single expression.
My first attempt looked something like this:
pixels[x-left] = { y: true };
However the letter y
is being used as the index instead of the value of y
, which is not OK.