Ad
  • Custom User Avatar

    do we know max length of the input string?

  • 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

    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

    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

    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