Stuck on exercise 16 "its all in the genes", keep getting an unexpected identifier error?


As in the title, I've been stuck on this for ages

Just says 'syntax error: unexpected identifier'

// create your Animal class here
Function Animal(name,numLegs){ = name;
    this.numLegs = numLegs;

// create the sayName method for Animal
Animal.prototype.sayName = function(){
    console.log("Hi my name is " +;


keywords are case-sensitive, Function and function are two different things


Hi astijfequn!

You need to change the the "f" in your function should be in lowercase (i.e. "function" NOT "Function").



in which does your answer differ from mine>?


They are both the same. I didn't realize you had replied until after I posted mine.

Sincere apologies!


There are two things here you should change...

First, your function has to be in lowercase not titlecase i.e. function not Function.

secondly, change the ; to , and dont include, after numLegs i.e..

function Animal(name,numLegs){ = name,
this.numLegs = numLegs


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.