+ 1

Disarium number finder doesn’t work

I am making a Disarium number finder for the challenge. It finds one, but it won’t work for finding them in a given range. It just says undefined. Why does this happen? Here is the code: https://code.sololearn.com/WWnZk8k8f9Ci/?ref=app

24th Jun 2019, 6:33 AM
Lucas Nioi
Lucas Nioi - avatar
1 ответ
+ 1
Hi Lucas Nioi, Change the argument of the "charAt" method at line 26 from "i" to "a" and assign 0 to "a" after the inner loop at line 25 and it'll work.
25th Jun 2019, 11:41 AM
Ryan
Ryan - avatar