I don't understand what I did wrong please help me!


#1

// Below is the greeting function!
// See line 7
// We can join strings together using the plus sign (+)
// See the hint for more details about how this works.

var sayHello = function(name) {
console.log('Hello' + " " + name);
};

// On line 11, call the greeting func
sayHello("Minke");

It keeps telling me I didn't call the function, but it does print out what I want, "Hello Minke"


#2

Did you change the name of the function?


#3

Reset the whole thing and type it all again, have had similar issues and when I reset it all and rewrite it exactly the same it works. Some kind of bug. Not copy and paste either, rewrite it all.

It could also be looking for something like console.log("Hello " + name); or console.log("Hello" + " " + name);

Just saying that because even though I believe 'word' can be used for a string in java the general programming rule that they are for single characters and not strings. Strings tend to stick with the " word " format


#4

What is wrong with this code?
https://www.codecademy.com/courses/javascript-beginner-en-6LzGd/0/3?curriculum_id=506324b3a7dffd00020bf661#


#5

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.