Depending on the random generator, you have either the question EN01 on the page or the question EB01.
That means that this JavaScript will throw an error:
questionN.style.display = "none";
questionB.style.display = "none";
The difference is when the error is thrown. In condition 1, the first line works, and the script will stop working in the second line. In condition 2, the first line will stop the script.
There are different possible solutions. One is to package the question into a <div>
and display/hide only that.
Another one is to test which element you have available:
if (questionN) {
questionN.style.display = "none";
}
if (questionB) {
questionB.style.display = "none";
}