Tell us what’s happening:
I’m not sure if I’m reading how to do this correctly or not. Is my way anywhere near what they are wanting?
Your code so far
function wordBlanks("dog", "big", "ran", "quickly") {
// Your code below this line
var result = "The " + wordBlanks[1] + " " + wordBlanks[0] + " "
+ wordBlanks[2] + " " + wordBlanks[3];
// Your code above this line
return result;
}
// Change the words here to test your function
wordBlanks("cat", "little", "hit", "slowly");
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36.
You changed code above the “Your code below this line”. You removed the arguments and put strings in. Additionally, wordBlanks is a function, not an array. I suggest going back a few challenges to review when arguments were introduced.
function wordBlanks(myNoun, myAdjective, myVerb, myAdverb) {
// Your code below this line
var result = "The " + wordBlanks[1] + " " + wordBlanks[0] + " "
wordBlanks[2] + " " + wordBlanks[3];
// Your code above this line
return result;
}
// Change the words here to test your function
wordBlanks(“cat”, “little”, “hit”, “slowly”);
You don’t have an array wordBlanks so you can’t use that notation. But you can reference those words using exactly the words written as parameters in the function