Ad
  • Default User Avatar

    test.ts:2:30 - error TS2306: File '/workspace/default/solution.ts' is not a module.

    what's the matter there ?

  • Default User Avatar
  • Default User Avatar

    I wasn't having it lol

  • Default User Avatar

    Kata successfully submited!
    Azassssu!!! (Japanese slang for 'arigato gozaimasu');

  • Custom User Avatar

    Nobody here can see your code. I've changed the tests to properly compare the actual/expected values, so you should be able to reset the trainer and get useful feedback on test failure.

  • Custom User Avatar
  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    This is what I'm doing! Still, it's returning errors.... probably (hopefully!!) just a typo, since I don't want to lose this kata.

  • Custom User Avatar

    For some reason I misread your post and thought you were using Swift. I've edited the response for JS.

  • Default User Avatar

    This looks good in swift. No such thing in the JS-environment I'm using. Would that be the name of the function in my case?

  • Custom User Avatar

    Always look to the sample tests. For example, the first test for JS is

    Test.expect( goodVsEvil('1 1 1 1 1 1', '1 1 1 1 1 1 1') === 'Battle Result: Evil eradicates all trace of Good', 'Evil should win' );
    

    and the right hand side of the equality statement is what you should be returning: namely, the string as in the problem description.

  • Default User Avatar

    I don't see what value I should return with that function (JavaScript). The string as in the examples? Or the calculated sum?
    Pretty confusing.
    Code works perfectly in my sandbox.