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

Conditionals and Control Flow Forum

View Course » View Exercise

1127 points
Submitted by
Jeff Patterson
almost 3 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'):

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

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?


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


$items = 10;

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


138 points
Submitted by
over 2 years ago