Function code test says it's wrong :(

Tell us what’s happening
I’m having a problem with this code, I followed the instructions, even looked at a hint, but the test that says "if reusableFunction is called, it should output the string “Hi World” onto the console. " I’m not sure what I did wrong, since all signs point to it being correct. Please help me :frowning:

**Your code so far**

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

**Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.82 Safari/537.36

Challenge: Write Reusable JavaScript with Functions

Link to the challenge:

I copy/pasted your code and it works. Try resetting this challenge.

2 Likes

that didn’t work either

Did you change the code from your first post? I tried again, resetting the challenge and copy/pasting you code and it worked! Can you please show me your code?

function reusableFunction() {
console.log(“Hi World”);
}
reusableFunction();

I know that it might seems wierd but, try to use ’ instead of "

function reusableFunction() {
  console.log('Hi World');
}
reusableFunction();

that didn’t work either

the code you posted works for me, try a different browser or in an incognito window

As said, try it in a private window in Chrome with extensions disabled.

If it works you have some extension installed that is interfering with the test or some cache issue. You can reset the challenge and do a hard refresh (Shift + F5 or Ctrl + Shift + r) to make sure it isn’t a cache issue.

It should work just fine in Chrome but you can also try in Firefox.

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