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
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
Just make "length = len(list(s))" if you need to know it.
This comment is hidden because it contains spoiler information about the solution
Tests are running against a valid api endpoint (that is hidden from us).
What you have to do :
This doesn't make any sense. Where in the description does it mention that the center should be included every time?
What should be the output when I provideinput (length, currentPage, size) : (10,3,4) ?
Thank you so much! Stripping the whitespace passed the solution.
It's because of that.
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?
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
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:
It's
length
, notlenth
. But fixing that would break your code.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.
I love
Doesnt seem right to compare boolean