Bug still not resolved

Tell us what’s happening:
I am currently going through the Javascript course and have come upon this lesson.

Write Reusable JavaScript with Functions

Your code so far

My answer is as the top example gives.


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

ourReusableFunction();

// Only change code below this line
function reusableFunction() {
    console.log("Hi World");
}

however when I submit the answer, it comes up saying that the answer is incorrect. I saw on other forum submitted here that this was a bug that was reported and may have been resolved some months ago, but I am just wanting to point out that this still seems to be the issue.

Thank you very much.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/write-reusable-javascript-with-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 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

You didn’t call the function.

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

Hi HUCKJ6804

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

You have call this function by using its name followed by parentheses, like this:

reusableFunction();

All of the code between the curly braces will be executed every time the function is called.

Thank you so much, this was my first ever post here on FCC so your support is much appreciated.

I’m sorry I still don’t understand what that means. I have followed the example shown exactly, yet it still is coming up that my answer isn’t working. I have the semicolon at the end of the function within the curly brackets, so I guess I don’t understand how to “call” the function. I thought everything within the curly brackets is defining WHAT function resuableFunction is, but again when I submit my answer it shows “Hi World” under “Heyya World”.

Apologies if this is more confusing. I do appreciate the help you have offered me very much though. :smiley:

1 Like