Tell us what’s happening:
I don’t know what’s wrong with my code, though it’s giving me the correct output.
It’s giving me an error “Should not modify the myDog setup”, I don’t know why?
Please help me someone.
Your code so far
// Setup
var myDog = {
"name": "Happy Coder",
"legs": 4,
"tails": 1,
"friends": ["freeCodeCamp Campers"],
"bark": "woof"
};
// Only change code below this line
delete myDog.tails;
//console.log(myDog);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36
.
Challenge: Delete Properties from a JavaScript Object
Link to the challenge:
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript/delete-properties-from-a-javascript-object