Ad
  • Default User Avatar

    Nice Kata - appears simple but the large numbers cause some great alternative thinking on the python solutions. Thank you

  • Default User Avatar

    Good afternoon,

    Im no expert, but const is not changeable once it is declared, so if it is declared in the scope of the whole function, it will be set once and then not change for the duration of the function.

    If the const is declared inside the while loop, for each loop the const will be declared as a new variable, and when it cycles to the next loop it is recreated.

    Does this work if you change the const above the while loop to 'let'?

  • Default User Avatar

    What language are you trying to learn?

  • Custom User Avatar

    Am I missing something, the console log for n is 7 and it says expected a result of '8' and a log of 13 expects '16'. That is not correct when reading the description. Unless I am missing something fundamental?

  • Custom User Avatar

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