JS Assignment 11 #2
QuinzaeBeard (0)

function exerciseTwo(animal){
// Exercise Two: In this exercise you will be given an object called 'animal'
// Create a new variable called 'animalName'
// Accessing the animal object, assign the 'animalName' variable to the 'latinName' key on the object.
// return the animalName variable.
animal.latinName= animalName;
return animalName();

You are viewing a single comment. View All
Answered by vedprad1 (732) [earned 5 cycles]
View Answer
vedprad1 (732)

I think this should be the final answer:

function exerciseTwo(animal) {
  var animalName;
  animalName = animal.latinName;
  return animalName;

If this answer is correct, please check the checkmark on the left side of this message. Thanks and Good Luck!

vedprad1 (732)

@QuinzaeBeard : You said return animalName()! With parentheses! But it is a variable, not a function. There should be no parentheses.

If this is right, select the first post as correct. It would be greatly appreciated.

QuinzaeBeard (0)

@vedprad1 i completely agree but the repl.it system disagrees lol

vedprad1 (732)

@QuinzaeBeard : Can you share the link to your code? Thanks!

QuinzaeBeard (0)

@vedprad1 such a simple mistake lol...thanks so much

CeciliaOrji (0)

@QuinzaeBeard can you help with the answer to exerciseone, been at it since yesterday. JS question 11. Thanks