Reusable Functions with JavaScript

Tell us what’s happening:

Hello there,
I have since been trying to figure out way to go beyond this unresponsive page which is not accepting my answer. Kindly help verify my code below.

Link to the page is in description right below.

  **Your code so far**

function reusableFunction() {
console.log("Hi World");
}
  **Your browser information:**

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

Challenge: Write Reusable JavaScript with Functions

Link to the challenge:

I have since been trying to figure out way to go beyond this unresponsive page which is not accepting my answer.

I think the easiest way would be to successfully complete the challenge. The instructions were:

  1. Create a function called reusableFunction which prints "Hi World" to the dev console.
  2. Call the function.

You did step one, you didn’t do step two. This is what the error messages:

reusableFunction should output the string Hi World to the console.

You should call reusableFunction after you define it.

The last message is the clearest, but they both stem from the same thing.

When I add one line to your code to complete task #2, this passes for me.

And what would be the correct answer from your pespective?
I have tried all possibilities from my angle of thought and still seam not to come to pass this stage.

This is how you define a function:

function myFunction(){
  // do stuff
}

This is how you call a function:

myFunction()
2 Likes

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