Cannot move past because not enough curly braces

My code is as follows. It’s telling me that I cannot progress because I’m missing a curly brace somewhere.

function testElseIf(val) {
  if (val > 10) {
    return "Greater than 10";
  else if (val < 5) {
    return "Smaller than 5";
  else if (val > 5 || val < 10) {
    return "Between 5 and 10";

// Change this value to test

That’s weird. Maybe I just haven’t written enough JS lately, but I count enough.

I tried it out here:
It’s working fine there and got Between 5 and 10.

Which environment or sandbox did you try it in? Maybe the parser has some issue

I do have a suggestion for your last line of logic, perhaps try switching it to
else if (val >= 5 && val <=10) , that’s actually the equivalent of between 5 and 10
For (val > 5 || val < 10), it will accept ANY number if you remove the first two logic.
Cos the logic will always be met. You may test it.

Is that all the code that you have in your document or do you have another code block somewhere? If you do have more code, it is possible that there is something missing in there.