There are details at tc39/test262#4332 , but the summary is that QuickJS incorrectly rejects as invalid attempts to create scoped declarations named undefined.
For example, this should print "START" and then "PASS", but instead throws a SyntaxError before anything happens (which is only warranted when such a declaration appears at the top-level scope):
print('START');
{
const undefined = 1;
print(undefined === 1 ? 'PASS' : 'FAIL');
}
It may also be worth noting that the analogous NaN and Infinity cases are handled correctly.