Retired

(Don't) Make Me Repeat Myself (retired)

3,254 of 3,418Neurotrace
Description
Loading description...
Strings
Fundamentals
  • Please sign in or sign up to leave a comment.
  • hobovsky Avatar

    This kata is a subject to deduplication process here: https://github.com/codewars/content-issues/issues/109.
    Please join the discussion to help us identify duplicate kata and retire them.

  • ejini战神 Avatar
    • No random tests

    • Node 12. should be enabled

    • Test.expect should be replaced with assert.strictEqual

  • FArekkusu Avatar

    The description should clearly state what the function is supposed to do, even when it's obvious from the function name.

  • user4896126 Avatar

    terrible description, no one knows what they have to do

  • Voile Avatar

    This comment has been hidden.

  • LazerFX Avatar

    This comment has been hidden.

  • IVBakker Avatar

    Needs more tests...

  • daprela Avatar

    Can anyone explain why it says I failed the test? That's my output:

    aaa

    ho ho ho

    nananananananana

    Test Failed: 'a'.repeat(3) should return 'aaa'

  • jimankrom Avatar

    Test should contain 0 repeats... which makes clear how the spec has gaps.

    Repeat 0 should return the original. Repeat 1 should return the original and a repeat. If I repeat something, it's said twice.

    OR

    Repeat 0 returns empty string, Repeat 1 returns the original string.

    { expected: '', actual: 'ho '.repeat(0), msg: ''ho '.repeat(0) should return an empty string' },

  • madskonradsen Avatar

    This comment has been hidden.

  • jhoffner Avatar

    FYI The JS code is executed server side. The errors you are seeing in the console is related to the application itself (and most likely the Ace editor plugin, which throws some of its own errors sometimes).

  • GeekMan Avatar

    My first attempt didn't work on 'Attempt', it came back with an 'undefined' error. I checked my browser's console (Chrome), and it gave me the error 'cannot call replaced on undefined'. I wasn't trying to call a 'replaced' method anywhere myself. And I've since learned has happened to a few others on CodeWars (unsure whether it was this particular Kata, or otherwise)

  • tforbus Avatar

    I think this will be a cool kata for people to learn a little bit of JS code golf. ;)