Why would they want me to do it exactly their way? i literally coded my own good function working all well and its wrong because it wasnt made their way lol
Hi Team… I’m new and while the result gets printed cleanly on my screen- Its still appearing as wrong? Any ideas?
function sillySentence (adjective, verb, noun) { return I am so ${adjective} because I ${verb} coding! Time to write some more awesome ${noun}!;} I have tried variable name changes, using const syntax versus function. Any variation gives me the printed result on the screen, but still asks if i have used string concatenation or string interpolation?
the name of the parameters do not matter. Just make sure your string prints out exactly what they have, how they have it; spaces, caps, punct’s and all.
So my code works perfectly, and I used interpolation.
const sillySentence = (adj,verb,noun) => {
return `I am so ${adj} because I ${verb} coding! Time to write some more awesome ${noun}`;
}
But Codecademy keeps marking it wrong and hitting me with this error/question:
Did you use string concatenation or interpolation to fill in the blanks of this sentence: ‘I am so __ because I ___ coding! Time to write some more awesome ___ !’?
Copy paste error and replace the __ with ${variable}, cuz this error is occurring when something is missing in the sentence …be it additional space or anything.
function sillySentence(string1,string2,string3){
return I am so ${string1} because I ${string2} coding! Time to write some more awesome ${string3}!;
const sillySentence = (adjective, verb, noun) => {
return ‘I am so ’ + adjective + ’ because I ’ + verb + ’ coding! Time to write some more awesome ’ + noun +’!’;
};