This code doesn’t work

Blot seems to escape ampersand characters in embedded JavaScript, turning &&” into & amp;& amp;” (minus the spaces). Unfortunately, they’re not turned back again, so you can’t use the boolean and operator. I’m working around this for now by using double if statements.

var x = true;
var y = true;
if (x && y)
    console.log("This should print");

Inspect the webpage with browser developer tools just below this text to see what is actually produced.

June 10, 2018


Next:Making a Space Game