title: Khan SmileyFace - Infinite Loop Trouble
body: <p>I'm working on the SmileyFace project in Khan Academy.  It's harder than I've been able to do so far.</p>
  
  <p>Why is the text command outputting an infinite loop?  The output should be 'Hello.' but is printing:</p>
  
  <pre><code>"function(speak){
  __env__KAInfiniteLoopCount++;
  if (__env__KAInfiniteLoopCount++&lt;"
  </code></pre>
  
  <p>...and more lines after this.</p>
  
  <p>Thank you.  Here is my code:</p>
  
  <pre><code>var SmileyFace = function(centerX,centerY){
      this.centerX = centerX; 
      this.centerY = centerY;
  };
  
  SmileyFace.prototype.draw = function() {
      fill(255, 234, 0);
      ellipse(this.centerX, this.centerY, 150, 150);
      fill(0, 0, 0);
      ellipse(this.centerX-30, this.centerY-30, 20, 20); 
      ellipse(this.centerX+30, this.centerY-30, 20, 20); 
      noFill(); 
      strokeWeight(3);
      arc(this.centerX, this.centerY+10, 64, 40,0,180);  
  };
  
  SmileyFace.prototype.speak = function(speak){
      text(this.speak,this.centerX,this.centerY+40);
  }; 
  
  var face = new SmileyFace(200,300);
      face.draw();
      face.speak("Hello.");
  </code></pre>