Okay, apparently the correct usage is throw new Error("square must be between 1 and 64"). There must be some subtle reason for this which I’m unfamiliar with.
The MDN docs explain this quite well. But the TL;DR; as I understand it is that things expect that the Error has message containing a string. By just throwing a string, it doesn’t have that message field.
From reading the docs it seemed to me that throw returns a string, not actually throws an error. Don’t know why throw wouldn’t throw an error by default, but not much into JavaScript these days, so I’m just gonna sign and move on…