I have a function on codewars.com called getNumberLength(n)
. This function takes a number with different digits and should return the length of the number. For example, for the number n=2000
, the function should return 4.
I have already added some test cases using the Test.assertEquals()
method, but now I need to add a test case with random numbers. Can anyone help me figure out how to do this on codewars? I couldn't find any explanation in their documentation on how to create random test cases. They have their own methods for test cases, so experienced users, please lend a hand! Just to provide some context, the function is written in JavaScript.