We're a place where coders share, stay up-to-date and grow their careers.
You can make a bit improvement
botType.indexOf(item) > 1 => botType.includes(item)
This will make code work, but it is O(n^2) (the same as the original code)
O(n^2)
You can make a bit improvement
This will make code work, but it is
O(n^2)
(the same as the original code)