• Sign Up
    Time to claim your honor
  • Training
  • Practice
    Complete challenging Kata to earn honor and ranks. Re-train to hone technique
  • Freestyle Sparring
    Take turns remixing and refactoring others code through Kumite
  • Community
  • Leaderboards
    Achieve honor and move up the global leaderboards
  • Chat
    Join our Discord server and chat with your fellow code warriors
  • Discussions
    View our Github Discussions board to discuss general Codewars topics
  • About
  • Docs
    Learn about all of the different aspects of Codewars
  • Blog
    Read the latest news from Codewars and the community
  • Log In
  • Sign Up
thecodeite Avatar
Name:Sam Plews
Clan:Codebar
Member Since:Dec 2015
Last Seen:Feb 2025
Profiles:
Following:7
Followers:22
Allies:5
View Profile Badges
  • Stats
  • Kata
  • Collections
  • Kumite
  • Social
  • Discourse
  • Conversations (307)
  • Replies
  • Authored
  • Needs Resolution
  • Custom User Avatar
    • Chrono79
    • commented on "Find the first non-consecutive number" kata
    • 2 months ago

    The kata works just fine, the problem is in your code, read the test label, print the input, create a sample test and figure out why your code fails:

    JavaScript Completions 26847

    Read this: https://docs.codewars.com/training/troubleshooting/#print-input

  • Custom User Avatar
    • AlexandriaMayer
    • commented on "Find the first non-consecutive number" kata
    • 2 months ago

    This Kata does not work. I entered in the code that was equivelent to the solution and the null solution kept on returning undefined.

  • Custom User Avatar
    • MikalaiLappo
    • created a suggestion for "Represent array of numbers as ranges" kata
    • 4 months ago

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

  • Custom User Avatar
    • pilaster777
    • commented on "Find the first non-consecutive number" kata
    • 5 months ago

    oh
    so I choose the exact opposite interpretation.....
    thx for your patience,
    the "new" interpretation makes it a bit easier ;)

  • Custom User Avatar
    • hobovsky
    • commented on "Find the first non-consecutive number" kata
    • 5 months ago

    The meaning of "consecutive" is explained in the description: "By not consecutive we mean not exactly 1 larger than the previous element of the array." So basically numbers which differ by more than one are not consecutive. In the example [4,6,7,8,9,11] the 6 is not consecutive, because it does not come (as a natural number) after 4.

  • Custom User Avatar
    • pilaster777
    • commented on "Find the first non-consecutive number" kata
    • 5 months ago

    hm, thx for the rply at first.

    as I understand it, the logic of the consecutiveness is defined by the first two entries....
    (and therefore the first two entries can never be the answer...)

    ... am I wrong?

  • Custom User Avatar
    • hobovsky
    • commented on "Find the first non-consecutive number" kata
    • 5 months ago

    Did you test your solution with examples? Did you try this test case?

    test.assert_equals(first_non_consecutive([4,6,7,8,9,11]), 6)

    Your solution has a bug and fails when the answer is on position 1, for example [0, 2, 3]. You need to fix it.

  • Custom User Avatar
    • pilaster777
    • commented on "Find the first non-consecutive number" kata
    • 5 months ago

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

  • Custom User Avatar
    • lenaquisa
    • commented on "Represent array of numbers as ranges" kata
    • 8 months ago

    Thank you for explanation!

  • Custom User Avatar
    • rowcased
    • commented on "Represent array of numbers as ranges" kata
    • 8 months ago

    Sorry for being a bit glib. Here are your options:

    1. you could skip the kata
    2. you could learn enough about a new language to solve it
    3. and yes, you could translate the kata

    Meanwhile, translating is the most involved process, and less like simply having the chance to solve it in the language of your preference and then move on.

    I guess also you could just

    1. ask someone else to translate it, hope for the best, and wait...

    But if you want to translate it from JS or TS, there is some documentation on translating a kata.

    Best of luck!

  • Custom User Avatar
    • lenaquisa
    • commented on "Represent array of numbers as ranges" kata
    • 8 months ago

    not really, I'm new here.
    Should i adapt this kata for other languages?

  • Custom User Avatar
    • rowcased
    • commented on "Represent array of numbers as ranges" kata
    • 8 months ago

    And now you know what to do, plain and simple.

  • Custom User Avatar
    • lenaquisa
    • commented on "Represent array of numbers as ranges" kata
    • 8 months ago

    I would like to decide this kata, but only JS and typescript :-/

  • Custom User Avatar
    • IMPERIALISTICO
    • commented on "Represent array of numbers as ranges" kata
    • 8 months ago

    Nice kata! This turned out to be a challenge for me :D

  • Custom User Avatar
    • Chrono79
    • commented on "Represent array of numbers as ranges" kata
    • 8 months ago

    The expected answer for that test is '1,3,5,7,9'. The input should be [1,3,5,7,9]

  • Loading more items...
  • © 2025 Codewars
  • About
  • API
  • Blog
  • Privacy
  • Terms
  • Code of Conduct
  • Contact

Confirm

  • Cancel
  • Confirm

Collect: undefined

Loading collection data...