https://www.youtube.com/shorts/VS2ZCCGYmpA
Your code only returns inside an if, if the condition is not met, then your function returns undefined and that's what you see.
undefined
won't let me return 0 keep saying undefined
🤡🤡🤡
🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡
If an empty value ( null, None, Nothing etc. ) is given instead of an array, or the given array is an empty list or a list with only 1 element, return 0.
null
None
Nothing
This comment is hidden because it contains spoiler information about the solution
Loading collection data...
https://www.youtube.com/shorts/VS2ZCCGYmpA
Your code only returns inside an if, if the condition is not met, then your function returns
undefined
and that's what you see.won't let me return 0 keep saying undefined
🤡🤡🤡
🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution