To take it even a little further, move this out of the inner loop and get rid of the test at all. As you always are going to append a line-break after each row, this is sufficient:
result += "\n";
Thanks to 200_success for pointing that out.
var size = 8,
result = "";
for (var i = 0; i < size; i++) {
for (var j = 0; j < size; j++) {
result += (i + j) % 2 ? "◻" : "◼";
if (size - 1 == j) {}
result += "\n";
}
}
}
console.log(result);