Tell us what’s happening:
Im not %100 sure what i am doing wrong. It’s telling me "assignment to undeclared variable cat, which i thought i assigned to "cat
Your code so far
function wordBlanks(myNoun, myAdjective, myVerb, myAdverb) {
// Your code below this line
var result = "";
myNoun="dog";
myAdjective="big";
myVerb="ran";
myAdverb="quickly";
cat="cat";
little="little";
hit="hit";
slowly="slowly";
result = "my" + "myAdjective" + "myNoun" + "myVerb" + "very" + "myAdverb" + "and my" + "little" + "cat" + "was in the way and" + "got" + "slowly" + "hit";
// Your code above this line
return result;
}
// Change the words here to test your function
wordBlanks("dog", "big", "ran", "quickly");
wordBlanks("cat", "little", "hit", "slowly");
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/word-blanks