Struggling guys! help please

Tell us what’s happening:

Your code so far


function ourReuseableFunction() {
console.log("Heyya, World");}

reuseableFunction();

function reuseableFunction() {
console.log("Hi World");}

reuseableFunction();

function functionName() {
console.log("Hello World");
}

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36.

Challenge: Write Reusable JavaScript with Functions

Link to the challenge:

You should only have one fuction. You have 3. You should rarely (if ever) have more than one function with the same name.

Just a guess based on what you might be expecting…

You called your first function ourReusableFunction but in the line after called reusableFunction.

Did you forget the “our” in ourReusableFunction?

function ourReuseableFunction() {
  console.log("Heyya, World");
  }

ourReuseableFunction();

reuseableFunction() {
  console.log("Hi world");
}

reuseableFunction();

i have added ourReuseableFunction, it still doesnt work !

It is reusableFunction not reuseableFunction.

re
usable
Function

Can you share what are seeing and also what you are expecting to see?

If you’re trying to pass the exercise, nhcarrigan’s suggestion likely good. You need to use only the function reusableFunction, which is what the exercise calls for.

Good luck!

function ourReuseableFunction() {
  console.log("Heyya, World");
  }

ourReuseableFunction();

function reuseableFunction() {
  console.log("Hi World");
}

reuseableFunction();

manage to get point 2 correct with 2 functions

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.

Note: Backticks are not single quotes.

markdown_Forums

anyway you could explain how it should be done?

Thank you

Again it is usable not useable. Look carefully at the spelling.

Thanks it worked !!! your a star…

1 Like