• Custom User Avatar

    Just make "length = len(list(s))" if you need to know it.

  • Custom User Avatar

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

  • Custom User Avatar

    Tests are running against a valid api endpoint (that is hidden from us).
    What you have to do :

    1. call the Fetch api method using parameter (apiUrl)
    2. this function will return the object which has 2 properties. And these properties have function definition (logic to get the jokeounch line...)
    3. real api call is hidden from us, so you have to visualize the data using data sample given to us.
  • Custom User Avatar

    This doesn't make any sense. Where in the description does it mention that the center should be included every time?

  • Custom User Avatar

    What should be the output when I provideinput (length, currentPage, size) : (10,3,4) ?

    • If I include left side pages -4, it goes to negavtive
    • If I include right sie pages to compensate the left side values, then surpasses array length 10
  • Custom User Avatar

    Thank you so much! Stripping the whitespace passed the solution.

  • Custom User Avatar

    Any whitespace at the end of the line should also be stripped out.

    It's because of that.

  • Custom User Avatar

    Returned 'apples, plums
    pears
    oranges' but expected 'apples, plums
    pears
    oranges'

    my test is failing. Can someone please help. may be it is looking for \n in my string?

  • Custom User Avatar

    I didn't change my code and it worked :) I have a guard around null check but problem was around empty array, something like this [] and it was preventing me to call the property [].length
    Thanks for your message! All worked well

  • Custom User Avatar

    If the array of arrays is null/nil or empty

    null is not the same as an empty array. You can't read the length of null and that's what the error is about.

    You have a typo in your code:

    if(lengthArray.lenth){
          return 0
      }
    

    It's length, not lenth. But fixing that would break your code.

  • Custom User Avatar

    I am not going crazy but my array is empty and I am getting the error that TypeError: Cannot read property 'length' of null at getLengthOfMissingArray (test.js:4:9

    my code is :
    [].length == 0
    return 0

    but instead I am getting the error.

  • Custom User Avatar
  • Custom User Avatar

    Doesnt seem right to compare boolean