Console.log eror

I am doing the challenge “Write reusable Javascript with functions”. I see there is a bug that was reported in 2018 regarding this challenge not working properly. The question is

  1. Create a function called reusableFunction which prints "Hi World" to the dev console.
  2. Call the function.
    The answer should be
    function resuableFunction() {
    console.log(“Hi World”);
    }
    reusableFunction();

However, it doesn’t work and returns an error. Is the bug still not fixed?

You’ve misspelled reusableFunction

When I copy pasted your code, it was unable to recognize your double quotes…

After replacing it with " and fixing the typo, The code worked in my browser

My bad. Been scratching my head for ages on that one. Simple spelling mistake!!
Thanks

You changed double quotes, or it worked with this??

tilted quotes are automatically added in the forum in place of the straight ones, so that could be what’s happening there

to avoid that, backticks are needed to format the code

1 Like