Ad
  • Custom User Avatar

    Babel (which is used to allow the usage of ES2015 stuff) implements the ES2015 rule that assigning a function to a variable defines the function's name as the variable name. You can work around this by assigning the function to a differently named variable, and then assign that variable to a variable called helloWorld.

  • Custom User Avatar

    I'd guess this is because ES2015 makes a function defined var helloWorld = function() also have the name "helloWorld". And on codeewars babel makes this happen.