Write Reusable JavaScript with Functions- not passing

Tell us what’s happening:

This is not passing the Call reusableFunction after you define it test. Any thoughts on why?

Your code so far


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

ourReusableFunction();

// Only change code below this line

const reusableFunction = ()=> {
    console.log('Hi World')
}

reusableFunction()

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/write-reusable-javascript-with-functions

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

reusableFunction()

Even using ES5 does not pass.

Make sure you are ending your statements with semicolons.

2 Likes