title: How to change the prototype of "animal" and add method "sayName" to print statement
body: <p>I've been doing a lot of HTML and CSS and now I'm doing a JS tutorial. I ran into this problem though. I don't know how to access the prototype.</p>
  <p>Instructions:</p>
  <blockquote>
  <p>Create a class named Animal with two properties, <code>name</code> and <code>numLegs</code>. The Animal constructor should have two arguments whose values are assigned to <code>name</code> and <code>numLegs</code>.</p>
  <p>Next, change the prototype of Animal and add a method sayName that prints to the console &quot;Hi my name is <code>[name]</code>&quot;, where <code>[name]</code> is the value of name.</p>
  <p>Click &quot;Stuck? Get a hint!&quot; for examples of how to create a class and how to add a method to an object's prototype.</p>
  <p>Finally, we have provided the last two lines to test your constructor and <code>sayName</code> method. Don't change these!</p>
  </blockquote>
  <p>Here is my code:</p>
  <pre><code>// create your Animal class here
  function Animal(name, numLegs)={
      this.name=name;
      this.numLegs=numLegs;
  
      this.sayName=function(){
          console.log(&quot;Hi, my name is &quot;+this.name);
      }
  }
  
  
  // create the sayName method for Animal
  
  // provided code to test above constructor and method
  var penguin = new Animal(&quot;Captain Cook&quot;, 2);
  penguin.sayName();
  </code></pre>
  <p>I get a syntax error. What gives?</p>