Ask coding questions

← Back to all posts
JS assignmnet 11: introduction to objects
janetsomehow1 (3)
Hello everyone, i am new to javascript and i dont seem to understand what to do in this exercise. I keep getting error messages. Please help

TheDrone7 (1073)

We cannot open your submissions, only you and your teacher can. I would recommend you to create a new repl and paste the code in that repl. Also, I would need you to explain what exactly is your assignment and what is the error that you keep getting?

janetsomehow1 (3)

@TheDrone7 function exerciseOne(){
// Exercise One: In this exercise you will create a variable called 'aboutMe'
// This variable should be assigned a new object
// In this object create three key:value pairs
// The keys should be: 'name', 'city', 'favoriteAnimal'
// The values should be strings associated with the keys.
// return the variable 'aboutMe'
var aboutMe = {
return aboutMe;
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.
let animalName = {
animalName: 'latinName';

function exerciseThree(userObject){
// Exercise Three: In this exercise you will be given an object called 'userObject'
// The phonne number for this user is incorrect!
// reassign the 'phoneNumber' key to the value: '(951)867-5309'
// return the userObject

janetsomehow1 (3)

@TheDrone7 so i created the variable about me and added the name, city and favorite animal but the code didnt run

Vandesm14 (2264)

@janetsomehow1 You have to call the function. If you want to run exerciseOne, you have to add exerciseOne(); at the bottom of the file.
Likewise for the other functions

Please mark this as answered if I helped your problem 👍

Vandesm14 (2264)

@jjaime12 Can you paste the code into a repl verbatim? I think the code you posted is wrong. If you give us a repl, we can show you a direct answer which will refer directly to the code instead of the copy paste.