This forum is now read-only. Please use our new forums at discuss.codecademy.com.

Conditionals and Control Flow Forum

View Course » View Exercise

1117 points
50d2461a7ecdd32c86000938_633450185
Submitted by
Jeff Patterson
almost 2 years ago

While typing else statement, lesson hangs with the following error

While typing the if/else blocks, it seems the parser hangs before I get the chance to finish typing else.

The code I typed looks like this when the error starts (before I can finish typing 'else'):

<?php
$items = 3;
if ($items > 5) {
    echo "You get a 10% discount!";
}
els
?>

The error in the developer console:

composer_controller-705d840d0b232f0870d677428999e449.js:1 Uncaught Error: Codex invalid state: cannot send commands while not in ready state

Is there a client-side fix for this or should we come back to this course after this error has been fixed by Codecademy?

Update!

I was able complete this lesson! Here's what I did:

  1. right click on the page, click 'View page info' -> 'Show cookies and site data'
  2. delete the contents of both 'Local storage' and 'Session storage' folders.
  3. Refresh the page

When I redid the lesson, I just made sure to type else very quickly, then everything worked out fine.


0 votes

permalink

<?php
$items = 10;

    if($items > 5) {
      echo "You get a 5% discount!";
    }
    else {
        echo "You get a 10% discount";
    }

  ?>
</p>

138 points
5549251d51b887149b0003b7_534701066
Submitted by
Selda KARTAL
almost 2 years ago