Reusablefunction

Don’t why I’m still getting this error message even after I called the function

// running tests Hi World You should call

reusableFunction

after you define it. // tests completed // console output Hi World

This is my code

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

Hi @Lizzybholly

Can you please provide a link to the challenge you are referring to.

  • You should invoke the function on its own line
  • Use "" for enclosing Hi world.
function reusableFunction() {
     console.log("Hi World");
} 
reusableFunction();

Thanks :grinning:, was really wondering what I doing wrong.

@Lizzybholly You technically were not doing anything wrong. Our tests are not flexible enough. I have created this PR to allow the function to be called before or after without worrying about where the function call is made. Once this PR is merged, the code you originally attempted would pass with no problem.

Edit: I discovered an additional bug with this challenge. It was letting the following pass the second test when it should not have. My PR now addresses this issue too.

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